Merge pull request #7327 from asgerf/js/handlebars-more-raw-interpolation

Approved by erik-krogh
This commit is contained in:
CodeQL CI
2021-12-17 14:07:57 +00:00
committed by GitHub
8 changed files with 141 additions and 79 deletions

View File

@@ -551,9 +551,11 @@ module Templating {
private class MustacheStyleSyntax extends TemplateSyntax {
MustacheStyleSyntax() { this = "mustache" }
override string getRawInterpolationRegexp() { result = "(?s)\\{\\{\\{(.*?)\\}\\}\\}" }
override string getRawInterpolationRegexp() {
result = "(?s)\\{\\{\\{(.*?)\\}\\}\\}|\\{\\{&(.*?)\\}\\}"
}
override string getEscapingInterpolationRegexp() { result = "(?s)\\{\\{[^{](.*?)\\}\\}" }
override string getEscapingInterpolationRegexp() { result = "(?s)\\{\\{[^{&](.*?)\\}\\}" }
override string getAFileExtension() { result = ["hbs", "njk"] }