From ad2b3d0109aa86845c257d433947451ccfb6b57d Mon Sep 17 00:00:00 2001 From: edukisto <52005215+edukisto@users.noreply.github.com> Date: Sat, 13 Mar 2021 17:23:55 +0300 Subject: [PATCH] Fix formatting errors --- components/prism-false.js | 6 +- components/prism-false.min.js | 2 +- .../false/assembler_code_feature.test | 10 +- .../false/character_code_feature.test | 19 +-- tests/languages/false/comment_feature.test | 45 +----- tests/languages/false/operator_feature.test | 125 +++------------ .../languages/false/punctuation_feature.test | 10 +- tests/languages/false/string_feature.test | 34 +---- tests/languages/false/variable_feature.test | 143 ++++-------------- 9 files changed, 77 insertions(+), 317 deletions(-) diff --git a/components/prism-false.js b/components/prism-false.js index f672540458..f95af6efcd 100644 --- a/components/prism-false.js +++ b/components/prism-false.js @@ -1,6 +1,6 @@ (function (Prism) { /** - * Implements. + * Based on the manual by Wouter van Oortmerssen. * * @see {@link https://github.com/PrismJS/prism/issues/2801#issue-829717504} */ @@ -21,11 +21,11 @@ alias: 'important' }, 'number': /\d+/, - 'operator': /[-!#$%&'*+,./:;=>?@\\^_`|~\xdf\xf8]/, + 'operator': /[-!#$%&'*+,./:;=>?@\\^_`|~ßø]/, 'punctuation': /\[|\]/, 'variable': /[a-z]/, 'non-standard': { - pattern: /[()?@\\^_`|~\xdf\xf8]/,punctuation:/\[|\]/,variable:/[a-z]/,"non-standard":{pattern:/[()?@\\^_`|~ßø]/,punctuation:/\[|\]/,variable:/[a-z]/,"non-standard":{pattern:/[()?@[\\]^_`|~ßø}" - ], - [ - "comment", - "{\"\"}" - ], - [ - "comment", - "{foo}" - ], - [ - "comment", - "{{}" - ], - [ - "comment", - "{}" - ], - [ - "comment", - "{}" - ], - [ - "comment", - "{}" - ], - [ - "comment", - "{}" - ], - "}" + ["comment", "{\n}"], + ["comment", "{!#$%&'*+,-./:;=>?@[\\]^_`|~ßø}"], + ["comment", "{\"\"}"], + ["comment", "{foo}"], + ["comment", "{{}"], + ["comment", "{}"], + ["comment", "{}"], ["comment", "{}"], + ["comment", "{}"], "}" ] ---------------------------------------------------- diff --git a/tests/languages/false/operator_feature.test b/tests/languages/false/operator_feature.test index 20e0579da1..6b23f50e15 100644 --- a/tests/languages/false/operator_feature.test +++ b/tests/languages/false/operator_feature.test @@ -27,106 +27,31 @@ _ ---------------------------------------------------- [ - [ - "operator", - "!" - ], - [ - "operator", - "#" - ], - [ - "operator", - "$" - ], - [ - "operator", - "%" - ], - [ - "operator", - "&" - ], - [ - "operator", - "*" - ], - [ - "operator", - "+" - ], - [ - "operator", - "," - ], - [ - "operator", - "-" - ], - [ - "operator", - "." - ], - [ - "operator", - "/" - ], - [ - "operator", - ":" - ], - [ - "operator", - ";" - ], - [ - "operator", - "=" - ], - [ - "operator", - ">" - ], - [ - "operator", - "?" - ], - [ - "operator", - "@" - ], - [ - "operator", - "\\" - ], - [ - "operator", - "^" - ], - [ - "operator", - "_" - ], - [ - "operator", - "`" - ], - [ - "operator", - "|" - ], - [ - "operator", - "~" - ], - [ - "operator", - "ß" - ], - [ - "operator", - "ø" - ] + ["operator", "!"], + ["operator", "#"], + ["operator", "$"], + ["operator", "%"], + ["operator", "&"], + ["operator", "*"], + ["operator", "+"], + ["operator", ","], + ["operator", "-"], + ["operator", "."], + ["operator", "/"], + ["operator", ":"], + ["operator", ";"], + ["operator", "="], + ["operator", ">"], + ["operator", "?"], + ["operator", "@"], + ["operator", "\\"], + ["operator", "^"], + ["operator", "_"], + ["operator", "`"], + ["operator", "|"], + ["operator", "~"], + ["operator", "ß"], + ["operator", "ø"] ] ---------------------------------------------------- diff --git a/tests/languages/false/punctuation_feature.test b/tests/languages/false/punctuation_feature.test index b72b2427f3..d447862c08 100644 --- a/tests/languages/false/punctuation_feature.test +++ b/tests/languages/false/punctuation_feature.test @@ -4,14 +4,8 @@ ---------------------------------------------------- [ - [ - "punctuation", - "[" - ], - [ - "punctuation", - "]" - ] + ["punctuation", "["], + ["punctuation", "]"] ] ---------------------------------------------------- diff --git a/tests/languages/false/string_feature.test b/tests/languages/false/string_feature.test index ec2666f0ce..b9baf89236 100644 --- a/tests/languages/false/string_feature.test +++ b/tests/languages/false/string_feature.test @@ -9,34 +9,12 @@ ---------------------------------------------------- [ - [ - "string", - "\"\n\"" - ], - [ - "string", - "\"!#$%&'*+,-./:;=>?@[\\]^_`|~ßø\"" - ], - [ - "string", - "\"\"" - ], - [ - "string", - "\"\"" - ], - [ - "string", - "\"\"" - ], - [ - "string", - "\"foo\"" - ], - [ - "string", - "\"{}\"" - ] + ["string", "\"\n\""], + ["string", "\"!#$%&'*+,-./:;=>?@[\\]^_`|~ßø\""], + ["string", "\"\""], + ["string", "\"\""], ["string", "\"\""], + ["string", "\"foo\""], + ["string", "\"{}\""] ] ---------------------------------------------------- diff --git a/tests/languages/false/variable_feature.test b/tests/languages/false/variable_feature.test index 847914d0cb..01f09bbf2a 100644 --- a/tests/languages/false/variable_feature.test +++ b/tests/languages/false/variable_feature.test @@ -29,122 +29,33 @@ zzz ---------------------------------------------------- [ - [ - "variable", - "a" - ], - [ - "variable", - "b" - ], - [ - "variable", - "c" - ], - [ - "variable", - "d" - ], - [ - "variable", - "e" - ], - [ - "variable", - "f" - ], - [ - "variable", - "g" - ], - [ - "variable", - "h" - ], - [ - "variable", - "i" - ], - [ - "variable", - "j" - ], - [ - "variable", - "k" - ], - [ - "variable", - "l" - ], - [ - "variable", - "m" - ], - [ - "variable", - "n" - ], - [ - "variable", - "o" - ], - [ - "variable", - "p" - ], - [ - "variable", - "q" - ], - [ - "variable", - "r" - ], - [ - "variable", - "s" - ], - [ - "variable", - "t" - ], - [ - "variable", - "u" - ], - [ - "variable", - "v" - ], - [ - "variable", - "w" - ], - [ - "variable", - "x" - ], - [ - "variable", - "y" - ], - [ - "variable", - "z" - ], - [ - "variable", - "z" - ], - [ - "variable", - "z" - ], - [ - "variable", - "z" - ] + ["variable", "a"], + ["variable", "b"], + ["variable", "c"], + ["variable", "d"], + ["variable", "e"], + ["variable", "f"], + ["variable", "g"], + ["variable", "h"], + ["variable", "i"], + ["variable", "j"], + ["variable", "k"], + ["variable", "l"], + ["variable", "m"], + ["variable", "n"], + ["variable", "o"], + ["variable", "p"], + ["variable", "q"], + ["variable", "r"], + ["variable", "s"], + ["variable", "t"], + ["variable", "u"], + ["variable", "v"], + ["variable", "w"], + ["variable", "x"], + ["variable", "y"], + ["variable", "z"], + ["variable", "z"], ["variable", "z"], ["variable", "z"] ] ----------------------------------------------------