diff --git a/src/lib/utils.js b/src/lib/utils.js
index 7993ab7cd2..3b9a0f1069 100644
--- a/src/lib/utils.js
+++ b/src/lib/utils.js
@@ -3,7 +3,12 @@
* @returns {string}
*/
export function escapeHTML(value) {
- return value.replace(/&/g, '&').replace(//g, '>');
+ return value
+ .replace(/&/g, '&')
+ .replace(//g, '>')
+ .replace(/"/g, '"')
+ .replace(/'/g, ''');
}
/**
@@ -121,7 +126,7 @@ export function mergeStreams(original, highlighted, value) {
function open(node) {
/** @param {Attr} attr */
function attr_str(attr) {
- return ' ' + attr.nodeName + '="' + escapeHTML(attr.value).replace(/"/g, '"') + '"';
+ return ' ' + attr.nodeName + '="' + escapeHTML(attr.value) + '"';
}
// @ts-ignore
result += '<' + tag(node) + [].map.call(node.attributes, attr_str).join('') + '>';
diff --git a/test/markup/abnf/default.expect.txt b/test/markup/abnf/default.expect.txt
index 6f11816349..158d6748de 100644
--- a/test/markup/abnf/default.expect.txt
+++ b/test/markup/abnf/default.expect.txt
@@ -17,6 +17,6 @@ a
/ insensitive
hex-codes = %x68.65.6C.6C.6F
-literal = "string literal"
-sensitive = %s"case-sensitive string"
-insensitive = %i"case-insensitive string"
+literal = "string literal"
+sensitive = %s"case-sensitive string"
+insensitive = %i"case-insensitive string"
diff --git a/test/markup/accesslog/default.expect.txt b/test/markup/accesslog/default.expect.txt
index 0548608e3a..022d1b0e0d 100644
--- a/test/markup/accesslog/default.expect.txt
+++ b/test/markup/accesslog/default.expect.txt
@@ -1,5 +1,5 @@
-20.164.151.111 - - [20/Aug/2015:22:20:18 -0400] "GET /mywebpage/index.php HTTP/1.1" 403 772 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.220 Safari/535.1"
-127.0.0.1 user-identifier frank [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326
-192.168.2.20 - - [28/Jul/2006:10:27:10 -0300] "GET /cgi-bin/try/ HTTP/1.0" 200 3395
-127.0.0.90 - - [13/Sep/2006:07:00:53 -0700] "PROPFIND /svn/some_url/Extranet/branches/SOW-101 HTTP/1.1" 401 587
-66.249.78.17 – – [13/Jul/2015:07:18:58 -0400] "GET /robots.txt HTTP/1.1" 200 0 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
+20.164.151.111 - - [20/Aug/2015:22:20:18 -0400] "GET /mywebpage/index.php HTTP/1.1" 403 772 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.220 Safari/535.1"
+127.0.0.1 user-identifier frank [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326
+192.168.2.20 - - [28/Jul/2006:10:27:10 -0300] "GET /cgi-bin/try/ HTTP/1.0" 200 3395
+127.0.0.90 - - [13/Sep/2006:07:00:53 -0700] "PROPFIND /svn/some_url/Extranet/branches/SOW-101 HTTP/1.1" 401 587
+66.249.78.17 – – [13/Jul/2015:07:18:58 -0400] "GET /robots.txt HTTP/1.1" 200 0 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
diff --git a/test/markup/arcade/profile.expect.txt b/test/markup/arcade/profile.expect.txt
index e7ace43e6e..06047aba5b 100644
--- a/test/markup/arcade/profile.expect.txt
+++ b/test/markup/arcade/profile.expect.txt
@@ -2,8 +2,8 @@
Isolated test for the most recent version
*/
function offsetPopulation(offset){
- var popDensity = Round( $feature.POPULATION / AreaGeodetic(Geometry($feature), "square-kilometers") );
- var geom = Geometry({ 'x': offset.x, 'y': offset.y, 'spatialReference':{'wkid':102100} });
- var myLayer = FeatureSet($map, ["POPULATION", "ELECTION-DATA"]);
+ var popDensity = Round( $feature.POPULATION / AreaGeodetic(Geometry($feature), "square-kilometers") );
+ var geom = Geometry({ 'x': offset.x, 'y': offset.y, 'spatialReference':{'wkid':102100} });
+ var myLayer = FeatureSet($map, ["POPULATION", "ELECTION-DATA"]);
return popDensity;
-}
\ No newline at end of file
+}
diff --git a/test/markup/arduino/default.expect.txt b/test/markup/arduino/default.expect.txt
index edffa907be..1e6a196047 100644
--- a/test/markup/arduino/default.expect.txt
+++ b/test/markup/arduino/default.expect.txt
@@ -22,3 +22,4 @@
digitalWrite(led, LOW);
delay(1000);
}
+
diff --git a/test/markup/bash/escaped-quote.expect.txt b/test/markup/bash/escaped-quote.expect.txt
index dec5bb849c..72b2f0c5c2 100644
--- a/test/markup/bash/escaped-quote.expect.txt
+++ b/test/markup/bash/escaped-quote.expect.txt
@@ -1,2 +1,2 @@
-echo '"quoted"' | tr -d \" > text.txt
+echo '"quoted"' | tr -d \" > text.txt
diff --git a/test/markup/bash/no-numbers.expect.txt b/test/markup/bash/no-numbers.expect.txt
index 33fc753c41..5b96c2855b 100644
--- a/test/markup/bash/no-numbers.expect.txt
+++ b/test/markup/bash/no-numbers.expect.txt
@@ -1,3 +1,3 @@
-
+
$ tail -10 access.log
diff --git a/test/markup/bash/strings.expect.txt b/test/markup/bash/strings.expect.txt
index 39abcc1b1d..4b8adce812 100644
--- a/test/markup/bash/strings.expect.txt
+++ b/test/markup/bash/strings.expect.txt
@@ -1,3 +1,3 @@
-SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-TLS_DIR="$SCRIPT_DIR/../src/main/resources/tls"
-ROOT_DIR="$SCRIPT_DIR/.."
+SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+TLS_DIR="$SCRIPT_DIR/../src/main/resources/tls"
+ROOT_DIR="$SCRIPT_DIR/.."
diff --git a/test/markup/clojure/globals_definition.expect.txt b/test/markup/clojure/globals_definition.expect.txt
index 5e54172d67..4cd5d183ad 100644
--- a/test/markup/clojure/globals_definition.expect.txt
+++ b/test/markup/clojure/globals_definition.expect.txt
@@ -4,34 +4,34 @@
(defn clojure-function [args]
- (let [string "multiline\nstring"
- regexp #"regexp"
+ (let [string "multiline\nstring"
+ regexp #"regexp"
number 100,000
booleans [false true]
keyword ::the-keyword]
(if true
(->>
- (list [vector] {:map map} #{'set})))))
+ (list [vector] {:map map} #{'set})))))
(def some-var)
-(def alternative-var "132")
+(def alternative-var "132")
-(defonce ^:private another-var #"foo")
+(defonce ^:private another-var #"foo")
(defn- add [x y] (+ x y))
(defprotocol Fly
- "A simple protocol for flying"
- (fly [this] "Method to fly"))
+ "A simple protocol for flying"
+ (fly [this] "Method to fly"))
(defrecord Bird [name species]
Fly
- (fly [this] (str (:name this) " flies...")))
+ (fly [this] (str (:name this) " flies...")))
(defmulti service-charge (fn [acct] [(account-level acct) (:tag acct)]))
@@ -43,7 +43,7 @@
(defmacro unless [pred a b]
`(if (not ~pred) ~a ~b))
-(unless false (println "Will print") (println "Will not print"))
+(unless false (println "Will print") (println "Will not print"))
(deftype Circle [radius])
diff --git a/test/markup/clojure/hint_col.expect.txt b/test/markup/clojure/hint_col.expect.txt
index fd61cae7dd..240a151400 100644
--- a/test/markup/clojure/hint_col.expect.txt
+++ b/test/markup/clojure/hint_col.expect.txt
@@ -6,29 +6,29 @@
(deftype
+ WebServiceRefs [(WebServiceRef {:name "fred" :type String})
+ (WebServiceRef {:name "ethel" :mappedName "lucy"})]}
Bar [ a
+ WebServiceRefs [(WebServiceRef {:name "fred" :type String})
+ (WebServiceRef {:name "ethel" :mappedName "lucy"})]}
b]
Foo (
+ WebServiceRefs [(WebServiceRef {:name "fred" :type String})
+ (WebServiceRef {:name "ethel" :mappedName "lucy"})]}
foo [this] 42))
(seq (.getAnnotations Bar))
-(seq (.getAnnotations (.getField Bar "b")))
-(seq (.getAnnotations (.getMethod Bar "foo" nil)))
+(seq (.getAnnotations (.getField Bar "b")))
+(seq (.getAnnotations (.getMethod Bar "foo" nil)))
diff --git a/test/markup/coffeescript/function.expect.txt b/test/markup/coffeescript/function.expect.txt
index 4d43e641b3..dfce2c1690 100644
--- a/test/markup/coffeescript/function.expect.txt
+++ b/test/markup/coffeescript/function.expect.txt
@@ -5,9 +5,9 @@
npmWishlist.sha256 = (str) ->
throw new Error()
-str.split(" ").map((m) -> m.charCodeAt(0))
+str.split(" ").map((m) -> m.charCodeAt(0))
-fs.readFile("package.json", "utf-8", (err, content) ->
+fs.readFile("package.json", "utf-8", (err, content) ->
data = JSON.parse(content)
data.version
diff --git a/test/markup/cos/basic.expect.txt b/test/markup/cos/basic.expect.txt
index e26474f10f..1a36cc7345 100644
--- a/test/markup/cos/basic.expect.txt
+++ b/test/markup/cos/basic.expect.txt
@@ -1,7 +1,7 @@
SET test = 1
set ^global = 2
-Write "Current date """, $ztimestamp, """, result: ", test + ^global = 3
+Write "Current date """, $ztimestamp, """, result: ", test + ^global = 3
if (^global = 2) {
- do ##class(Cinema.Utils).AddShow("test")
+ do ##class(Cinema.Utils).AddShow("test")
}
-d:(^global = 2) ..thisClassMethod(1, 2, "test")
+d:(^global = 2) ..thisClassMethod(1, 2, "test")
diff --git a/test/markup/cos/embedded.expect.txt b/test/markup/cos/embedded.expect.txt
index d070b70219..74bd3aa760 100644
--- a/test/markup/cos/embedded.expect.txt
+++ b/test/markup/cos/embedded.expect.txt
@@ -2,4 +2,4 @@
* Multiline comment
*/
&sql(SELECT * FROM Cinema.Film WHERE Length > 2)
-&js<for (var i = 0; i < String("test").split("").length); ++i) { console.log(i); }>
+&js<for (var i = 0; i < String("test").split("").length); ++i) { console.log(i); }>
diff --git a/test/markup/cpp/function-params.expect.txt b/test/markup/cpp/function-params.expect.txt
index a38804566f..b974a634a7 100644
--- a/test/markup/cpp/function-params.expect.txt
+++ b/test/markup/cpp/function-params.expect.txt
@@ -1,6 +1,6 @@
int f(
int a = 1,
- char* b = "2",
+ char* b = "2",
double c = 3.0,
ARRAY(int, 5) d,
void* e __attribute__((unused))
diff --git a/test/markup/cpp/number-literals.expect.txt b/test/markup/cpp/number-literals.expect.txt
index 09e2d5a680..e80b3293ba 100644
--- a/test/markup/cpp/number-literals.expect.txt
+++ b/test/markup/cpp/number-literals.expect.txt
@@ -1,6 +1,6 @@
-int number = 2'555'555'555;
-float exponentFloat = .123'456e3'000;
-float suffixed = 3.000'001'234f
-char word[] = { '3', '\0' };
+int number = 2'555'555'555;
+float exponentFloat = .123'456e3'000;
+float suffixed = 3.000'001'234f
+char word[] = { '3', '\0' };
float negative = -123.0f;
diff --git a/test/markup/cpp/preprocessor.expect.txt b/test/markup/cpp/preprocessor.expect.txt
index 2a7548ebc8..ee89b732a9 100644
--- a/test/markup/cpp/preprocessor.expect.txt
+++ b/test/markup/cpp/preprocessor.expect.txt
@@ -12,7 +12,7 @@
# define x(v) ((v))
# define x(v) ((v))
-#if MACRO_WITH_STRING_ARG("hello \"world\"")
+#if MACRO_WITH_STRING_ARG("hello \"world\"")
#elif MULTI_LINE < \
EXPRESSION
int bar;
diff --git a/test/markup/cpp/string-literals.expect.txt b/test/markup/cpp/string-literals.expect.txt
index d5efcbda98..814c481a11 100644
--- a/test/markup/cpp/string-literals.expect.txt
+++ b/test/markup/cpp/string-literals.expect.txt
@@ -1,69 +1,69 @@
-auto str = "Hello regular string";
-auto utf8 = u8"Hello utf-8 string";
-auto utf16 = u"Hello utf-16 string";
-auto utf32 = U"Hello utf-32 string";
+auto str = "Hello regular string";
+auto utf8 = u8"Hello utf-8 string";
+auto utf16 = u"Hello utf-16 string";
+auto utf32 = U"Hello utf-32 string";
-auto wide_char = L"Hello wchar_t string";
-auto lr = LR"(Hello
-world)";
+auto wide_char = L"Hello wchar_t string";
+auto lr = LR"(Hello
+world)";
-auto wide_char = L'H';
-auto cr = '\n';
-auto chr = 'H';
-auto utf8 = u8'H';
-auto utf16 = u'H';
-auto utf32 = U'H';
-auto unicode = L'\u202e'
-auto hex = '\xFF'
-auto octal = '\123'
+auto wide_char = L'H';
+auto cr = '\n';
+auto chr = 'H';
+auto utf8 = u8'H';
+auto utf16 = u'H';
+auto utf32 = U'H';
+auto unicode = L'\u202e'
+auto hex = '\xFF'
+auto octal = '\123'
-auto char_multi = R"(Hello
-"normal"
+auto char_multi = R"(Hello
+"normal"
multiline
-string.)";
-auto utf8_multi = u8R"(Hello
-"utf-8"
+string.)";
+auto utf8_multi = u8R"(Hello
+"utf-8"
multiline
-string)";
-auto utf16_multi = uR"(Hello
-"utf-16"
+string)";
+auto utf16_multi = uR"(Hello
+"utf-16"
multiline
-string)";
-auto utf32_multi = UR"(Hello
-"utf-32"
+string)";
+auto utf32_multi = UR"(Hello
+"utf-32"
multiline
-string)";
+string)";
-auto char_multi = R"blah1(Hello
-"normal"
+auto char_multi = R"blah1(Hello
+"normal"
multiline
-)"
-)blah"
-string.)blah1";
-auto utf8_multi = u8R"blah2(Hello
-"utf-8"
+)"
+)blah"
+string.)blah1";
+auto utf8_multi = u8R"blah2(Hello
+"utf-8"
multiline
-)"
-)blah"
-string)blah2";
-auto utf16_multi = uR"blah3(Hello
-"utf-16"
+)"
+)blah"
+string)blah2";
+auto utf16_multi = uR"blah3(Hello
+"utf-16"
multiline
-)"
-)blah"
-string)blah3";
-auto utf32_multi = UR"blah4(Hello
-"utf-32"
+)"
+)blah"
+string)blah3";
+auto utf32_multi = UR"blah4(Hello
+"utf-32"
multiline
-)"
-)blah"
-string)blah4";
+)"
+)blah"
+string)blah4";
#include <stdio>
-#include "lib.h"
+#include "lib.h"
diff --git a/test/markup/cpp/truncated-block-comment.expect.txt b/test/markup/cpp/truncated-block-comment.expect.txt
index a2f5ce048a..5d34afed47 100644
--- a/test/markup/cpp/truncated-block-comment.expect.txt
+++ b/test/markup/cpp/truncated-block-comment.expect.txt
@@ -1,3 +1,3 @@
+
\ No newline at end of file
diff --git a/test/markup/cpp/truncated-raw-string.expect.txt b/test/markup/cpp/truncated-raw-string.expect.txt
index 8d133e8bae..8b6abd1f47 100644
--- a/test/markup/cpp/truncated-raw-string.expect.txt
+++ b/test/markup/cpp/truncated-raw-string.expect.txt
@@ -1,5 +1,5 @@
-R"foo(
+R"foo(
Truncated raw string
-)nope"
+)nope"
Still not completed.
-
+
\ No newline at end of file
diff --git a/test/markup/crystal/literals.expect.txt b/test/markup/crystal/literals.expect.txt
index 46d8aef5dd..9580ee82a3 100644
--- a/test/markup/crystal/literals.expect.txt
+++ b/test/markup/crystal/literals.expect.txt
@@ -46,37 +46,37 @@
1_000_000.111_111
1_000_000.111_111e12
-'c'
-'\\'
-'\u{ABCD}'
-
-"string"
-"\u{48 45 4C 4C 4F}"
-"interpolated #{string}"
-"interpolated #{"string"}"
+'c'
+'\\'
+'\u{ABCD}'
+
+"string"
+"\u{48 45 4C 4C 4F}"
+"interpolated #{string}"
+"interpolated #{"string"}"
%(string)
%q(string)
%Q(string)
-%(hello ("world"))
-%[hello ["world"]]
-%{hello {"world"}}
-%<hello <"world">>
-%|hello "world"|
-"hello
- world"
-"hello \
+%(hello ("world"))
+%[hello ["world"]]
+%{hello {"world"}}
+%<hello <"world">>
+%|hello "world"|
+"hello
+ world"
+"hello \
world, \
- no newlines"
+ no newlines"
<<-STRING
Hello world
STRING
-<<-'HERE'
+<<-'HERE'
hello \n
HERE
:unquoted_symbol
-:"quoted symbol"
+:"quoted symbol"
:question?
:exclamation!
:+
diff --git a/test/markup/crystal/macro.expect.txt b/test/markup/crystal/macro.expect.txt
index 38b24477b9..6b0c9e94e3 100644
--- a/test/markup/crystal/macro.expect.txt
+++ b/test/markup/crystal/macro.expect.txt
@@ -1,9 +1,9 @@
-puts {{ "hello world" }}
+puts {{ "hello world" }}
-{% verbatim %}{{ "bla".id }}{% end %}
+{% verbatim %}{{ "bla".id }}{% end %}
macro foo
{% verbatim %}
- {{ "bla".id }}
+ {{ "bla".id }}
{% end %}
end
diff --git a/test/markup/crystal/operators.expect.txt b/test/markup/crystal/operators.expect.txt
index cd70109268..1b601023a2 100644
--- a/test/markup/crystal/operators.expect.txt
+++ b/test/markup/crystal/operators.expect.txt
@@ -31,4 +31,4 @@
[]?
[]=
/
-
+
\ No newline at end of file
diff --git a/test/markup/csharp/functions.expect.txt b/test/markup/csharp/functions.expect.txt
index 7546f94d22..0451c638dd 100644
--- a/test/markup/csharp/functions.expect.txt
+++ b/test/markup/csharp/functions.expect.txt
@@ -10,7 +10,7 @@
void ExampleFunctionDeclaration2()
;
-public string ExampleExpressionBodiedFunction1() => "dummy";
+public string ExampleExpressionBodiedFunction1() => "dummy";
public string ExampleExpressionBodiedFunction2()
- => "dummy";
\ No newline at end of file
+ => "dummy";
\ No newline at end of file
diff --git a/test/markup/csharp/identifiers.expect.txt b/test/markup/csharp/identifiers.expect.txt
index 566b865c4d..62d5fc6ce5 100644
--- a/test/markup/csharp/identifiers.expect.txt
+++ b/test/markup/csharp/identifiers.expect.txt
@@ -1,3 +1,4 @@
var @class = new MyClass();
doSomething(@var, @foo);
var a;
+
diff --git a/test/markup/csharp/string-interpolation.expect.txt b/test/markup/csharp/string-interpolation.expect.txt
index 65e754aa1a..99ae144c87 100644
--- a/test/markup/csharp/string-interpolation.expect.txt
+++ b/test/markup/csharp/string-interpolation.expect.txt
@@ -1,9 +1,9 @@
-var istr = $"{{Hello}},\n{$"\"{nested}\"" + @" and " + $@"""{nested}""" }";
-var ivstr = $@"{{Hello}},
+var istr = $"{{Hello}},\n{$"\"{nested}\"" + @" and " + $@"""{nested}""" }";
+var ivstr = $@"{{Hello}},
{
-$"\"{nested}\"" + @"
+$"\"{nested}\"" + @"
and
-" + $@"
-""{nested}""
-"
- }";
+" + $@"
+""{nested}""
+"
+ }";
diff --git a/test/markup/css/sample.expect.txt b/test/markup/css/sample.expect.txt
index 60c5cb55a4..7fdd2c75f3 100644
--- a/test/markup/css/sample.expect.txt
+++ b/test/markup/css/sample.expect.txt
@@ -16,7 +16,7 @@
filter: grayscale(0.5) blur(10px);
}
-a[href*="example"], * [lang^=en] {
+a[href*="example"], * [lang^=en] {
font-size: 2em;
}
@@ -39,7 +39,7 @@
}
@font-face {
- font-family: "Open Sans";
- src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
- url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
+ font-family: "Open Sans";
+ src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
+ url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
}
diff --git a/test/markup/css/url.expect.txt b/test/markup/css/url.expect.txt
index b9ca8ff039..04607703af 100644
--- a/test/markup/css/url.expect.txt
+++ b/test/markup/css/url.expect.txt
@@ -1,6 +1,6 @@
-div { background: url("foo/bar/baz.jpg") }
-div { background: url('foo/bar/baz.jpg') }
+div { background: url("foo/bar/baz.jpg") }
+div { background: url('foo/bar/baz.jpg') }
div { background: url(foo/bar/baz.jpg) }
div { background-image: url(data:image/png;base64,TWFuIGlzIGRpc3=) }
-div { background-image: url("data:image/png;base64,TWFuIGlzIGRpc3=") }
-div { background-image: url('data:image/png;base64,TWFuIGlzIGRpc3=') }
+div { background-image: url("data:image/png;base64,TWFuIGlzIGRpc3=") }
+div { background-image: url('data:image/png;base64,TWFuIGlzIGRpc3=') }
\ No newline at end of file
diff --git a/test/markup/dart/string-interpolation.expect.txt b/test/markup/dart/string-interpolation.expect.txt
index e35e1e61d6..b9d8aa8f98 100644
--- a/test/markup/dart/string-interpolation.expect.txt
+++ b/test/markup/dart/string-interpolation.expect.txt
@@ -1,3 +1,3 @@
-'1234$identifier $true';
+'1234$identifier $true';
-'1234${1234 + true + 'foo'}';
+'1234${1234 + true + 'foo'}';
diff --git a/test/markup/diff/comments.expect.txt b/test/markup/diff/comments.expect.txt
index 5477ae74f9..f9a21ddced 100644
--- a/test/markup/diff/comments.expect.txt
+++ b/test/markup/diff/comments.expect.txt
@@ -7,4 +7,4 @@
+ Here too
-+ Here we don't anymore after five '=' next to each other
++ Here we don't anymore after five '=' next to each other
diff --git a/test/markup/dockerfile/default.expect.txt b/test/markup/dockerfile/default.expect.txt
index 3d7b03da7d..aa428c10cb 100644
--- a/test/markup/dockerfile/default.expect.txt
+++ b/test/markup/dockerfile/default.expect.txt
@@ -16,8 +16,8 @@
EXPOSE 80
-VOLUME ["/var/www/html"]
+VOLUME ["/var/www/html"]
-WORKDIR "/var/www/html"
+WORKDIR "/var/www/html"
-CMD [ "/usr/sbin/php5-fpm", "-F" ]
+CMD [ "/usr/sbin/php5-fpm", "-F" ]
diff --git a/test/markup/dsconfig/default.expect.txt b/test/markup/dsconfig/default.expect.txt
index cfb2fbadb9..2ba24df5e9 100644
--- a/test/markup/dsconfig/default.expect.txt
+++ b/test/markup/dsconfig/default.expect.txt
@@ -1,24 +1,24 @@
dsconfig create-client-connection-policy \
- --policy-name "Restrictive Client Connection Policy" \
- --set "description:Restrictive Client Connection Policy" \
+ --policy-name "Restrictive Client Connection Policy" \
+ --set "description:Restrictive Client Connection Policy" \
--set enabled:true --set evaluation-order-index:1000 \
- --set "connection-criteria:User.0 Connection Criteria" \
+ --set "connection-criteria:User.0 Connection Criteria" \
--set maximum-concurrent-connections:2 \
- --set "maximum-connection-duration:1 s" \
- --set "maximum-idle-connection-duration:1 s" \
+ --set "maximum-connection-duration:1 s" \
+ --set "maximum-idle-connection-duration:1 s" \
--set maximum-operation-count-per-connection:1000
create-client-connection-policy \
- --policy-name "Another Client Connection Policy" \
+ --policy-name "Another Client Connection Policy" \
--set enabled:true --set evaluation-order-index:100 \
- --set 'connection-criteria:User.1 Connection Criteria' \
+ --set 'connection-criteria:User.1 Connection Criteria' \
--reset maximum-concurrent-connections
dsconfig set-access-control-handler-prop \
- --add global-aci:'(target="ldap:///cn=config")(targetattr="*")(version 3.0; acl "Allow access to the config tree by cn=admin,c=us"; allow(all) groupdn="ldap:///cn=directory administrators,ou=groups,c=us";)' \
- --add global-aci:'(target="ldap:///cn=monitor")(targetattr="*")(version 3.0; acl "Allow access to the monitor tree by cn=admin,c=us"; allow(all) groupdn="ldap:///cn=directory administrators,ou=groups,c=us";)' \
- --remove global-aci:'(target="ldap:///cn=alerts")(targetattr="*")(version 3.0; acl "Allow access to the alerts tree by cn=admin,c=us"; allow(all) groupdn="ldap:///cn=directory administrators,ou=groups,c=us";)'
+ --add global-aci:'(target="ldap:///cn=config")(targetattr="*")(version 3.0; acl "Allow access to the config tree by cn=admin,c=us"; allow(all) groupdn="ldap:///cn=directory administrators,ou=groups,c=us";)' \
+ --add global-aci:'(target="ldap:///cn=monitor")(targetattr="*")(version 3.0; acl "Allow access to the monitor tree by cn=admin,c=us"; allow(all) groupdn="ldap:///cn=directory administrators,ou=groups,c=us";)' \
+ --remove global-aci:'(target="ldap:///cn=alerts")(targetattr="*")(version 3.0; acl "Allow access to the alerts tree by cn=admin,c=us"; allow(all) groupdn="ldap:///cn=directory administrators,ou=groups,c=us";)'
-dsconfig delete-log-publisher --publisher-name "File-Based Error Logger"
+dsconfig delete-log-publisher --publisher-name "File-Based Error Logger"
diff --git a/test/markup/ebnf/quote-symbols.expect.txt b/test/markup/ebnf/quote-symbols.expect.txt
index 595a99089f..ac9da0ae80 100644
--- a/test/markup/ebnf/quote-symbols.expect.txt
+++ b/test/markup/ebnf/quote-symbols.expect.txt
@@ -1,5 +1,5 @@
-first_quote_symbol = "'" .
-second_quote_symbol = '"' .
+first_quote_symbol = "'" .
+second_quote_symbol = '"' .
\ No newline at end of file
diff --git a/test/markup/handlebars/block-with-param.expect.txt b/test/markup/handlebars/block-with-param.expect.txt
index accf7824eb..5cfa7737dc 100644
--- a/test/markup/handlebars/block-with-param.expect.txt
+++ b/test/markup/handlebars/block-with-param.expect.txt
@@ -1,2 +1,2 @@
{{#blockHelper param1 param2}}block content{{/blockHelper}}
-
+
\ No newline at end of file
diff --git a/test/markup/handlebars/block.expect.txt b/test/markup/handlebars/block.expect.txt
index 52de3bf769..1937d53164 100644
--- a/test/markup/handlebars/block.expect.txt
+++ b/test/markup/handlebars/block.expect.txt
@@ -1,2 +1,2 @@
{{#block}}block content{{/block}}
-
+
\ No newline at end of file
diff --git a/test/markup/handlebars/built-ins.expect.txt b/test/markup/handlebars/built-ins.expect.txt
index 06b6df66a8..357bb36eaf 100644
--- a/test/markup/handlebars/built-ins.expect.txt
+++ b/test/markup/handlebars/built-ins.expect.txt
@@ -9,4 +9,4 @@
{{lookup abc}}
{{log test}}
-
+
\ No newline at end of file
diff --git a/test/markup/handlebars/combinations-with-text.expect.txt b/test/markup/handlebars/combinations-with-text.expect.txt
index 383bea58a6..d866457688 100644
--- a/test/markup/handlebars/combinations-with-text.expect.txt
+++ b/test/markup/handlebars/combinations-with-text.expect.txt
@@ -1,6 +1,6 @@
some text
-{{#custom (nested (helper 'a{{bc' 1)) key=value as | blockParam |}} some {{blockParam}} text {{/custom}}
+{{#custom (nested (helper 'a{{bc' 1)) key=value as | blockParam |}} some {{blockParam}} text {{/custom}}
some text
-
+
\ No newline at end of file
diff --git a/test/markup/handlebars/comments.expect.txt b/test/markup/handlebars/comments.expect.txt
index e8f3741766..af06f3b104 100644
--- a/test/markup/handlebars/comments.expect.txt
+++ b/test/markup/handlebars/comments.expect.txt
@@ -1,4 +1,4 @@
{{expression}}
-
+
\ No newline at end of file
diff --git a/test/markup/handlebars/else-variants.expect.txt b/test/markup/handlebars/else-variants.expect.txt
index 55bc49d22c..78bb20062d 100644
--- a/test/markup/handlebars/else-variants.expect.txt
+++ b/test/markup/handlebars/else-variants.expect.txt
@@ -8,4 +8,4 @@
\{{else}} is not a keyword if escaped
-
+
\ No newline at end of file
diff --git a/test/markup/handlebars/escaped-mustaches.expect.txt b/test/markup/handlebars/escaped-mustaches.expect.txt
index d56ec49a6a..b75c3d9cbb 100644
--- a/test/markup/handlebars/escaped-mustaches.expect.txt
+++ b/test/markup/handlebars/escaped-mustaches.expect.txt
@@ -19,4 +19,4 @@
\\\\{{expression}}
\\\
-
+
\ No newline at end of file
diff --git a/test/markup/handlebars/expression-variants.expect.txt b/test/markup/handlebars/expression-variants.expect.txt
index dd1c2d9814..414dd4e377 100644
--- a/test/markup/handlebars/expression-variants.expect.txt
+++ b/test/markup/handlebars/expression-variants.expect.txt
@@ -1,27 +1,27 @@
text
-{{ "lite]'ral}}segment" }} text
+{{ "lite]'ral}}segment" }} text
-{{ 'lite]"ral}}segment' }} text
+{{ 'lite]"ral}}segment' }} text
-{{ [lite"'ral}}segment] }} text
+{{ [lite"'ral}}segment] }} text
-{{ abc "lite]'ral}}segment" }} text
+{{ abc "lite]'ral}}segment" }} text
-{{ abc 'lite]"ral}}segment' }} text
+{{ abc 'lite]"ral}}segment' }} text
-{{ abc [lite"'ral}}segment] }} text
+{{ abc [lite"'ral}}segment] }} text
-{{ abcd.[lite"'ral}}segment] }} text
+{{ abcd.[lite"'ral}}segment] }} text
-{{ abcd."lite]'ral}}segment" }} text
+{{ abcd."lite]'ral}}segment" }} text
-{{ abcd.'lite]"ral}}segment' }} text
+{{ abcd.'lite]"ral}}segment' }} text
-{{ abcd.''}} text
+{{ abcd.''}} text
-{{ abcd."" }} text
+{{ abcd."" }} text
{{ abcd.[] }} text
-
+
\ No newline at end of file
diff --git a/test/markup/handlebars/hashes.expect.txt b/test/markup/handlebars/hashes.expect.txt
index ddf626e066..5a6ca0dfae 100644
--- a/test/markup/handlebars/hashes.expect.txt
+++ b/test/markup/handlebars/hashes.expect.txt
@@ -9,4 +9,4 @@
{{{{#helper key=value}}}} {{{{/helper}}}}
{{helper (subExpression key=value)}}
-
+
\ No newline at end of file
diff --git a/test/markup/handlebars/literals-in-different-places.expect.txt b/test/markup/handlebars/literals-in-different-places.expect.txt
index a82bd9f8d7..2d43b9b3c9 100644
--- a/test/markup/handlebars/literals-in-different-places.expect.txt
+++ b/test/markup/handlebars/literals-in-different-places.expect.txt
@@ -11,4 +11,4 @@
{{helper (helper true false)}}
{{helper a=true b=false}}
-
+
\ No newline at end of file
diff --git a/test/markup/handlebars/literals.expect.txt b/test/markup/handlebars/literals.expect.txt
index 65cfda721f..484f4cad9c 100644
--- a/test/markup/handlebars/literals.expect.txt
+++ b/test/markup/handlebars/literals.expect.txt
@@ -6,9 +6,9 @@
{{helper undefined}}
-{{helper 'string'}}
+{{helper 'string'}}
-{{helper "string"}}
+{{helper "string"}}
{{helper [not a string literal but a variable]}}
-
+
\ No newline at end of file
diff --git a/test/markup/handlebars/partial-call.expect.txt b/test/markup/handlebars/partial-call.expect.txt
index 506dfef8fc..4ff92a6fb4 100644
--- a/test/markup/handlebars/partial-call.expect.txt
+++ b/test/markup/handlebars/partial-call.expect.txt
@@ -1,2 +1,2 @@
{{> partial}}
-
+
\ No newline at end of file
diff --git a/test/markup/handlebars/path-expressions.expect.txt b/test/markup/handlebars/path-expressions.expect.txt
index b5307b1830..9ebaf62401 100644
--- a/test/markup/handlebars/path-expressions.expect.txt
+++ b/test/markup/handlebars/path-expressions.expect.txt
@@ -7,4 +7,4 @@
{{{{#path.expression}}}} {{{{/path.expression}}}}
{{with.in.a.path.expression}} is not a built-in
-
+
\ No newline at end of file
diff --git a/test/markup/handlebars/raw-block.expect.txt b/test/markup/handlebars/raw-block.expect.txt
index b5d94e8a34..abbd3f46cf 100644
--- a/test/markup/handlebars/raw-block.expect.txt
+++ b/test/markup/handlebars/raw-block.expect.txt
@@ -1,2 +1,2 @@
{{{{#raw}}}} {{verbatim}} content {{{{/raw}}}} {{var}}
-
+
\ No newline at end of file
diff --git a/test/markup/handlebars/simple-expression.expect.txt b/test/markup/handlebars/simple-expression.expect.txt
index 41d5cc869f..a18900dbae 100644
--- a/test/markup/handlebars/simple-expression.expect.txt
+++ b/test/markup/handlebars/simple-expression.expect.txt
@@ -1,2 +1,2 @@
{{abc}}
-
+
\ No newline at end of file
diff --git a/test/markup/handlebars/sub-expressions.expect.txt b/test/markup/handlebars/sub-expressions.expect.txt
index 6b386b9c3c..47d00dfdc8 100644
--- a/test/markup/handlebars/sub-expressions.expect.txt
+++ b/test/markup/handlebars/sub-expressions.expect.txt
@@ -11,4 +11,4 @@
{{helper key=(subExpression 1 2)}}
{{helper (subExpression (canBeNested 1 2) anotherParam)}}
-
+
\ No newline at end of file
diff --git a/test/markup/handlebars/triple-mustache.expect.txt b/test/markup/handlebars/triple-mustache.expect.txt
index 3512548e3f..1787f8d7ae 100644
--- a/test/markup/handlebars/triple-mustache.expect.txt
+++ b/test/markup/handlebars/triple-mustache.expect.txt
@@ -1,2 +1,2 @@
{{{raw}}}
-
+
\ No newline at end of file
diff --git a/test/markup/http/default.expect.txt b/test/markup/http/default.expect.txt
index dafe8dc9d4..626a341e41 100644
--- a/test/markup/http/default.expect.txt
+++ b/test/markup/http/default.expect.txt
@@ -3,5 +3,5 @@
Content-Type: application/json; charset=utf-8
Content-Length: 19
-{"status": "ok", "extended": true}
-
+{"status": "ok", "extended": true}
+
\ No newline at end of file
diff --git a/test/markup/index.js b/test/markup/index.js
index b43ff81dde..28138ffa6b 100644
--- a/test/markup/index.js
+++ b/test/markup/index.js
@@ -1,10 +1,10 @@
'use strict';
-const fs = require('fs').promises;
-const glob = require('glob');
-const hljs = require('../../build');
-const path = require('path');
-const utility = require('../utility');
+const fs = require('fs').promises;
+const glob = require('glob');
+const hljs = require('../../build');
+const path = require('path');
+const utility = require('../utility');
hljs.debugMode();
@@ -15,20 +15,24 @@ function testLanguage(language, {testDir}) {
const where = testDir ?
path.join(testDir, '*.expect.txt') :
utility.buildPath('markup', language, '*.expect.txt');
- const filePath = where,
- filenames = glob.sync(filePath);
+ const filePath = where;
+ const filenames = glob.sync(filePath);
filenames.forEach(function(filename) {
- const testName = path.basename(filename, '.expect.txt'),
- sourceName = filename.replace(/\.expect/, '');
+ const testName = path.basename(filename, '.expect.txt');
+ const sourceName = filename.replace(/\.expect/, '');
it(`should markup ${testName}`, function(done) {
- const sourceFile = fs.readFile(sourceName, 'utf-8'),
- expectedFile = fs.readFile(filename, 'utf-8');
+ const sourceFile = fs.readFile(sourceName, 'utf-8');
+ const expectedFile = fs.readFile(filename, 'utf-8');
Promise.all([sourceFile, expectedFile]).then(function([source, expected]) {
const actual = hljs.highlight(language, source).value;
+ // Uncomment this for major changes that rewrite the test expectations
+ // which will then need to be manually compared by hand of course
+ // require('fs').writeFileSync(filename, actual);
+
actual.trim().should.equal(expected.trim());
done();
}).catch(function(err) { return done(err) });
@@ -37,22 +41,22 @@ function testLanguage(language, {testDir}) {
});
}
-describe('highlight() markup', async () => {
+describe('highlight() markup', async() => {
before(async function() {
const markupPath = utility.buildPath('markup');
if (!process.env.ONLY_EXTRA) {
- let languages = await fs.readdir(markupPath);
+ const languages = await fs.readdir(markupPath);
languages.forEach(testLanguage);
}
- let thirdPartyPackages = await getThirdPartyPackages();
+ const thirdPartyPackages = await getThirdPartyPackages();
thirdPartyPackages.forEach(
(pkg) => pkg.names.forEach(
- (name, idx) => testLanguage(name, {testDir: pkg.markupTestPaths[idx]})
+ (name, idx) => testLanguage(name, { testDir: pkg.markupTestPaths[idx] })
)
);
- })
+ });
- it("adding dynamic tests...", async function() {} ); // this is required to work
+ it("adding dynamic tests...", async function() {}); // this is required to work
});
diff --git a/test/markup/ini/array.expect.txt b/test/markup/ini/array.expect.txt
index 31bc35db02..0a48e00c1b 100644
--- a/test/markup/ini/array.expect.txt
+++ b/test/markup/ini/array.expect.txt
@@ -1,9 +1,10 @@
-moo=["foo"]
+
+moo=["foo"]
KNOWN_PEERS = [
- "finland.some-host.com:11625",
- "germany.some-host.com:11625",
- "hongkong.some-host.com:11625",
+ "finland.some-host.com:11625",
+ "germany.some-host.com:11625",
+ "hongkong.some-host.com:11625",
32,
true
]
diff --git a/test/markup/ini/comments.expect.txt b/test/markup/ini/comments.expect.txt
index 41bebbb647..8cc54c85dd 100644
--- a/test/markup/ini/comments.expect.txt
+++ b/test/markup/ini/comments.expect.txt
@@ -1,5 +1,5 @@
-x = "abc"
+x = "abc"
y = 123
[table]
diff --git a/test/markup/ini/tables.expect.txt b/test/markup/ini/tables.expect.txt
index f7c245ffba..e5c72b7ddb 100644
--- a/test/markup/ini/tables.expect.txt
+++ b/test/markup/ini/tables.expect.txt
@@ -1,4 +1,4 @@
[table]
[[array]]
[dotted.table.name]
-[target.'cfg(unix)']
+[target.'cfg(unix)']
diff --git a/test/markup/ini/types.expect.txt b/test/markup/ini/types.expect.txt
index 7a508b6a8b..72fb831a16 100644
--- a/test/markup/ini/types.expect.txt
+++ b/test/markup/ini/types.expect.txt
@@ -3,12 +3,12 @@
f = 7e+12
f = 2e3
f = -1.234e-12
-basic = "string"
-multi_basic = """multiple
-lines"""
-literal = 'string'
-multi_literal = '''multiple
-lines'''
+basic = "string"
+multi_basic = """multiple
+lines"""
+literal = 'string'
+multi_literal = '''multiple
+lines'''
b = true
b = false
b = on
@@ -17,4 +17,4 @@ lines'''
b = no
dotted.key = 1
array = [1, 2, 3]
-inline = {name = "foo", id = 123}
+inline = {name = "foo", id = 123}
diff --git a/test/markup/java/annotations.expect.txt b/test/markup/java/annotations.expect.txt
index 2c9d541e22..771657d382 100644
--- a/test/markup/java/annotations.expect.txt
+++ b/test/markup/java/annotations.expect.txt
@@ -8,5 +8,5 @@
}
class Example {
- void foo(@SuppressWarnings("unused") int bar) { }
+ void foo(@SuppressWarnings("unused") int bar) { }
}
diff --git a/test/markup/javascript/arrow-function.expect.txt b/test/markup/javascript/arrow-function.expect.txt
index 9683eb3982..b9ad0135fa 100644
--- a/test/markup/javascript/arrow-function.expect.txt
+++ b/test/markup/javascript/arrow-function.expect.txt
@@ -11,3 +11,4 @@ f(x => x
const bad = ((a, b) => [...a, b]);
const array = [1, 2, 3].reduce((acc, next) => [...acc, next], []);
sides.every((length,width=(3+2+(4/5))) => length > 0 );
+
diff --git a/test/markup/javascript/class.expect.txt b/test/markup/javascript/class.expect.txt
index c631c8f819..edc3e79e3b 100644
--- a/test/markup/javascript/class.expect.txt
+++ b/test/markup/javascript/class.expect.txt
@@ -2,7 +2,7 @@
constructor(speed, cost) {
super(speed);
- var c = Symbol('cost');
+ var c = Symbol('cost');
this[c] = cost;
this.intro = `This is a car runs at
diff --git a/test/markup/javascript/default-parameters.expect.txt b/test/markup/javascript/default-parameters.expect.txt
index d433ced456..1c8cfe96e7 100644
--- a/test/markup/javascript/default-parameters.expect.txt
+++ b/test/markup/javascript/default-parameters.expect.txt
@@ -1 +1 @@
-function visibleTodoFilter(state = 'watch', action) {}
+function visibleTodoFilter(state = 'watch', action) {}
diff --git a/test/markup/javascript/inline-languages.expect.txt b/test/markup/javascript/inline-languages.expect.txt
index 5f38b24334..370f041a57 100644
--- a/test/markup/javascript/inline-languages.expect.txt
+++ b/test/markup/javascript/inline-languages.expect.txt
@@ -1,15 +1,15 @@
let foo = true;
-`hello ${foo ? `Mr ${name}` : 'there'}`;
+`hello ${foo ? `Mr ${name}` : 'there'}`;
foo = false;
-html`<div id="foo">Hello world</div>`;
+html`<div id="foo">Hello world</div>`;
-html`<div id="foo">Hello times ${10} <span id="bar">world</span></div>`;
+html`<div id="foo">Hello times ${10} <span id="bar">world</span></div>`;
html`
- <ul id="list">
- ${repeat(['a', 'b', 'c'], (v) => {
- return html`<li class="item">${v}</li>`;
+ <ul id="list">
+ ${repeat(['a', 'b', 'c'], (v) => {
+ return html`<li class="item">${v}</li>`;
}}
</ul>
`;
@@ -20,5 +20,5 @@ css`
}
`;
-
+
var foo = 10;
diff --git a/test/markup/javascript/jsx.expect.txt b/test/markup/javascript/jsx.expect.txt
index 0f17aa4dd0..9c0501eeca 100644
--- a/test/markup/javascript/jsx.expect.txt
+++ b/test/markup/javascript/jsx.expect.txt
@@ -6,18 +6,18 @@
var x = 5;
-return (<node attr="value"></node>);
+return (<node attr="value"></node>);
const n = () => <X />
-const m = () => <X x="" />
+const m = () => <X x="" />
class App extends Component {
render() {
return (
<BrowserRouter>
<div>
- <Route path="/about" component={About} />
- <Route path="/contact" component={Contact} />
+ <Route path="/about" component={About} />
+ <Route path="/contact" component={Contact} />
</div>
</BrowserRouter>
);
diff --git a/test/markup/javascript/keywords.expect.txt b/test/markup/javascript/keywords.expect.txt
index 66edf9fc60..35f70a2546 100644
--- a/test/markup/javascript/keywords.expect.txt
+++ b/test/markup/javascript/keywords.expect.txt
@@ -2,7 +2,7 @@
try {
if (cls.search(/\bno\-highlight\b/) != -1)
return process(block, true, 0x0F) +
- ' class=""';
+ ' class=""';
} catch (e) {
}
diff --git a/test/markup/javascript/method-call.expect.txt b/test/markup/javascript/method-call.expect.txt
index c4f40657b0..8e118f6446 100644
--- a/test/markup/javascript/method-call.expect.txt
+++ b/test/markup/javascript/method-call.expect.txt
@@ -4,3 +4,4 @@ x = [
hljs.COMMENT(/\{%\s*comment\s*%}/, /\{%\s*endcomment\s*%}/),
hljs.COMMENT(/\{#/, /#}/),
]
+
diff --git a/test/markup/javascript/modules.expect.txt b/test/markup/javascript/modules.expect.txt
index 0f839093f8..6f031f7000 100644
--- a/test/markup/javascript/modules.expect.txt
+++ b/test/markup/javascript/modules.expect.txt
@@ -5,4 +5,4 @@
export function something() {};
-import _, { each, something as otherthing } from 'underscore';
+import _, { each, something as otherthing } from 'underscore';
diff --git a/test/markup/javascript/object-attr.expect.txt b/test/markup/javascript/object-attr.expect.txt
index 54e9d7301f..f927f9d8cc 100644
--- a/test/markup/javascript/object-attr.expect.txt
+++ b/test/markup/javascript/object-attr.expect.txt
@@ -2,7 +2,7 @@
key: value,
key2: value,
key2clone: value,
- 'key-3': value,
+ 'key-3': value,
key4: false ? undefined : true,
key5: value,
key6: value,
@@ -12,3 +12,4 @@
comment */
key10: value,
}
+
diff --git a/test/markup/json/comments.expect.txt b/test/markup/json/comments.expect.txt
index 33d39ec94b..e3ca89c7a3 100644
--- a/test/markup/json/comments.expect.txt
+++ b/test/markup/json/comments.expect.txt
@@ -1,17 +1,17 @@
[
{
- "title": "apples",
- "count": [12000, 20000],
- "description": {"text": "...", "sensitive": false}
+ "title": "apples",
+ "count": [12000, 20000],
+ "description": {"text": "...", "sensitive": false}
},
{
- "title": "oranges",
- "count": [17500, null],
- "description": {"text": "...", "sensitive": false}
+ "title": "oranges",
+ "count": [17500, null],
+ "description": {"text": "...", "sensitive": false}
}
-
+
]