Skip to content

Commit

Permalink
Fix escaping of non-interpolated text
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Quadflieg committed Nov 23, 2019
1 parent 09e96a3 commit e5c3944
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,8 @@ export const plugin: Plugin = {
val = formatText(val, singleQuote);
}

val = val.replace(/^#(\{|\[)/g, '\\#$1');

if (
['tag', 'id', 'interpolation', 'call', '&attributes', 'filter'].includes(
previousToken?.type
Expand Down

0 comments on commit e5c3944

Please sign in to comment.