Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/wp-file-.../lib/codemirr.../mode/dockerfi...
File: dockerfile.js
// CodeMirror, copyright (c) by Marijn Haverbeke and others
[0] Fix | Delete
// Distributed under an MIT license: http://codemirror.net/LICENSE
[1] Fix | Delete
[2] Fix | Delete
(function(mod) {
[3] Fix | Delete
if (typeof exports == "object" && typeof module == "object") // CommonJS
[4] Fix | Delete
mod(require("../../lib/codemirror"), require("../../addon/mode/simple"));
[5] Fix | Delete
else if (typeof define == "function" && define.amd) // AMD
[6] Fix | Delete
define(["../../lib/codemirror", "../../addon/mode/simple"], mod);
[7] Fix | Delete
else // Plain browser env
[8] Fix | Delete
mod(CodeMirror);
[9] Fix | Delete
})(function(CodeMirror) {
[10] Fix | Delete
"use strict";
[11] Fix | Delete
[12] Fix | Delete
// Collect all Dockerfile directives
[13] Fix | Delete
var instructions = ["from", "maintainer", "run", "cmd", "expose", "env",
[14] Fix | Delete
"add", "copy", "entrypoint", "volume", "user",
[15] Fix | Delete
"workdir", "onbuild"],
[16] Fix | Delete
instructionRegex = "(" + instructions.join('|') + ")",
[17] Fix | Delete
instructionOnlyLine = new RegExp(instructionRegex + "\\s*$", "i"),
[18] Fix | Delete
instructionWithArguments = new RegExp(instructionRegex + "(\\s+)", "i");
[19] Fix | Delete
[20] Fix | Delete
CodeMirror.defineSimpleMode("dockerfile", {
[21] Fix | Delete
start: [
[22] Fix | Delete
// Block comment: This is a line starting with a comment
[23] Fix | Delete
{
[24] Fix | Delete
regex: /#.*$/,
[25] Fix | Delete
token: "comment"
[26] Fix | Delete
},
[27] Fix | Delete
// Highlight an instruction without any arguments (for convenience)
[28] Fix | Delete
{
[29] Fix | Delete
regex: instructionOnlyLine,
[30] Fix | Delete
token: "variable-2"
[31] Fix | Delete
},
[32] Fix | Delete
// Highlight an instruction followed by arguments
[33] Fix | Delete
{
[34] Fix | Delete
regex: instructionWithArguments,
[35] Fix | Delete
token: ["variable-2", null],
[36] Fix | Delete
next: "arguments"
[37] Fix | Delete
},
[38] Fix | Delete
{
[39] Fix | Delete
regex: /./,
[40] Fix | Delete
token: null
[41] Fix | Delete
}
[42] Fix | Delete
],
[43] Fix | Delete
arguments: [
[44] Fix | Delete
{
[45] Fix | Delete
// Line comment without instruction arguments is an error
[46] Fix | Delete
regex: /#.*$/,
[47] Fix | Delete
token: "error",
[48] Fix | Delete
next: "start"
[49] Fix | Delete
},
[50] Fix | Delete
{
[51] Fix | Delete
regex: /[^#]+\\$/,
[52] Fix | Delete
token: null
[53] Fix | Delete
},
[54] Fix | Delete
{
[55] Fix | Delete
// Match everything except for the inline comment
[56] Fix | Delete
regex: /[^#]+/,
[57] Fix | Delete
token: null,
[58] Fix | Delete
next: "start"
[59] Fix | Delete
},
[60] Fix | Delete
{
[61] Fix | Delete
regex: /$/,
[62] Fix | Delete
token: null,
[63] Fix | Delete
next: "start"
[64] Fix | Delete
},
[65] Fix | Delete
// Fail safe return to start
[66] Fix | Delete
{
[67] Fix | Delete
token: null,
[68] Fix | Delete
next: "start"
[69] Fix | Delete
}
[70] Fix | Delete
],
[71] Fix | Delete
meta: {
[72] Fix | Delete
lineComment: "#"
[73] Fix | Delete
}
[74] Fix | Delete
});
[75] Fix | Delete
[76] Fix | Delete
CodeMirror.defineMIME("text/x-dockerfile", "dockerfile");
[77] Fix | Delete
});
[78] Fix | Delete
[79] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function