From 8d7b65d232cb1c9e1d95ef6c3510ecdee1d41657 Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Fri, 29 Sep 2023 17:03:06 +0200 Subject: [PATCH 1/4] feat(search): add more special character mappings --- deployer/src/deployer/search/models.py | 53 ++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/deployer/src/deployer/search/models.py b/deployer/src/deployer/search/models.py index c68e0328821c..f70ee7d2540e 100644 --- a/deployer/src/deployer/search/models.py +++ b/deployer/src/deployer/search/models.py @@ -194,6 +194,59 @@ "!= => Inequality", # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Assignment "= => Assignment", + # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Remainder_assignment + "% => Remainder", + # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Remainder + "%= => Remainderassignment", + # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_AND + "& => BitwiseAND", + # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_AND_assignment + "&= => BitwiseAND", + # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_NOT + "~ => BitwiseNOT", + # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_OR + "| => BitwiseOR", + # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_OR_assignment + "|= => BitwiseORassignment", + # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_XOR_assignment + "^= => BitwiseXORassignment", + # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_XOR + "^ => BitwiseXOR", + # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_XOR_assignment + "^= => BitwiseXORassignment", + # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Right_shift + ">> => Rightshift", + # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Right_shift_assignment + ">>= => Rightshiftassignment", + # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Unsigned_right_shift_assignment + ">>>= => UnsignedRightshiftassignment", + # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Left_shift + "<< => Leftshift", + # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Left_shift_assignment + "<<= => Leftshiftassignment", + # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Addition_assignment + "+= => Additionassignment", + # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Subtraction_assignment + "-= => Subtractionassignment", + # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Increment + "++ => Increment", + # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Decrement + "-- => Decrement", + # E.g. https://developer.mozilla.org/en-US/docs/Web/CSS/Comments + "/* => BlockCommentBegin", + "*/ => BlockCommentEnd", + # E.g. https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started#html_comments + " => HTMLCommentEnd", + # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#hashbang_comments + "#!` => HashbangComment", + # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#comments + "// => LineComment", + # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals + "` => TemplateLiteral", + # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#description + "${ => EmbeddedExpressionBegin", + "${} => EmbeddedExpression", ], ) From 4beb0c4045ea120fb0d1a70f279a37634bccd60d Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Fri, 29 Sep 2023 17:29:12 +0200 Subject: [PATCH 2/4] fixup! feat(search): add more special character mappings --- deployer/src/deployer/search/models.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/deployer/src/deployer/search/models.py b/deployer/src/deployer/search/models.py index f70ee7d2540e..0da167a7329f 100644 --- a/deployer/src/deployer/search/models.py +++ b/deployer/src/deployer/search/models.py @@ -208,8 +208,6 @@ "| => BitwiseOR", # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_OR_assignment "|= => BitwiseORassignment", - # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_XOR_assignment - "^= => BitwiseXORassignment", # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_XOR "^ => BitwiseXOR", # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_XOR_assignment From f8a4ecc8df16cb7cceb7a58f096fbce78b321814 Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Fri, 29 Sep 2023 23:43:26 +0200 Subject: [PATCH 3/4] fixup! fixup! feat(search): add more special character mappings --- deployer/src/deployer/search/models.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/deployer/src/deployer/search/models.py b/deployer/src/deployer/search/models.py index 0da167a7329f..b891d7f5d06a 100644 --- a/deployer/src/deployer/search/models.py +++ b/deployer/src/deployer/search/models.py @@ -231,20 +231,20 @@ # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Decrement "-- => Decrement", # E.g. https://developer.mozilla.org/en-US/docs/Web/CSS/Comments - "/* => BlockCommentBegin", - "*/ => BlockCommentEnd", + "/* => Blockcommentcegin", + "*/ => Blockcommentend", # E.g. https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started#html_comments - " => HTMLCommentEnd", + " => HTMLCommentend", # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#hashbang_comments - "#!` => HashbangComment", + "#!` => Hashbangcomment", # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#comments - "// => LineComment", + "// => Linecomment", # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals - "` => TemplateLiteral", + "` => Templateliteral", # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#description - "${ => EmbeddedExpressionBegin", - "${} => EmbeddedExpression", + "${ => Embeddedexpressionbegin", + "${} => Embeddedexpression", ], ) From dc8887ce8e3cf518fa3a3909dfbebb03c2d3578c Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Fri, 29 Sep 2023 23:44:50 +0200 Subject: [PATCH 4/4] fixup! fixup! fixup! feat(search): add more special character mappings --- deployer/src/deployer/search/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deployer/src/deployer/search/models.py b/deployer/src/deployer/search/models.py index b891d7f5d06a..a5f10e841c5b 100644 --- a/deployer/src/deployer/search/models.py +++ b/deployer/src/deployer/search/models.py @@ -231,11 +231,11 @@ # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Decrement "-- => Decrement", # E.g. https://developer.mozilla.org/en-US/docs/Web/CSS/Comments - "/* => Blockcommentcegin", + "/* => Blockcommentbegin", "*/ => Blockcommentend", # E.g. https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started#html_comments - " => HTMLCommentend", + " => HTMLcommentend", # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#hashbang_comments "#!` => Hashbangcomment", # E.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#comments