Skip to content

Commit 06bf246

Browse files
Jami CogswellJami Cogswell
authored andcommitted
QL: update regexes
1 parent d94ed1b commit 06bf246

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ql/ql/src/codeql_ql/ast/Ast.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,17 +211,17 @@ class QueryDoc extends QLDoc {
211211

212212
/** Gets the @name for the query */
213213
string getQueryName() {
214-
result = this.getContents().regexpCapture("(?s).*@name ([\\w-\\s]+)(?=\\n).*", 1)
214+
result = this.getContents().regexpCapture("(?s).*@name (.+?)(?=\\n).*", 1)
215215
}
216216

217217
/** Gets the id part (without language) of the @id */
218218
string getQueryId() {
219-
result = this.getContents().regexpCapture("(?s).*@id (\\w+)/([\\w\\-]+)\\s.*", 2)
219+
result = this.getContents().regexpCapture("(?s).*@id (\\w+)/([\\w\\-/]+)\\s.*", 2)
220220
}
221221

222222
/** Gets the language of the @id */
223223
string getQueryLanguage() {
224-
result = this.getContents().regexpCapture("(?s).*@id (\\w+)/([\\w\\-]+)\\s.*", 1)
224+
result = this.getContents().regexpCapture("(?s).*@id (\\w+)/([\\w\\-/]+)\\s.*", 1)
225225
}
226226
}
227227

0 commit comments

Comments
 (0)