Skip to content

Commit

Permalink
fix(deps): update dependency angular-html-parser to v2 (#3760)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Nico Jansen <jansennico@gmail.com>
  • Loading branch information
renovate[bot] and nicojs committed Oct 3, 2022
1 parent 1f1b7b1 commit 8dc667e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
32 changes: 16 additions & 16 deletions packages/instrumenter/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/instrumenter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@babel/preset-typescript": "~7.18.0",
"@stryker-mutator/api": "6.2.2",
"@stryker-mutator/util": "6.2.2",
"angular-html-parser": "~1.8.0",
"angular-html-parser": "~2.0.0",
"weapon-regex": "~1.0.2"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/instrumenter/src/parsers/html-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ async function ngHtmlParser(text: string, fileName: string, parserContext: Parse
return root;

async function parseScript<T extends ScriptFormat>(el: Element, scriptFormat: T): Promise<AstByFormat[T]> {
const content = text.substring(el.startSourceSpan!.end.offset, el.endSourceSpan!.start.offset);
const content = text.substring(el.startSourceSpan.end.offset, el.endSourceSpan!.start.offset);
const ast = await parserContext.parse(content, fileName, scriptFormat);
if (ast) {
const offset = el.startSourceSpan!.end;
const offset = el.startSourceSpan.end;
ast.root.start! += offset.offset;
ast.root.end! += offset.offset;
return {
Expand Down

0 comments on commit 8dc667e

Please sign in to comment.