Skip to content

Commit

Permalink
Updated regexp to fix issue when comment appear inside script tag (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
rzhornyk committed Nov 12, 2020
1 parent c2e8104 commit e706ec2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/diffhtml/lib/util/parse.js
Expand Up @@ -8,7 +8,7 @@ import { VTree, Supplemental, Options, ParserOptions, EMPTY } from './types';
// Magic token used for interpolation.
export const TOKEN = '__DIFFHTML__';

const doctypeEx = /<!.*>/i;
const doctypeEx = /<!DOCTYPE.*>/i;
const spaceEx = /[^ ]/;
const tokenEx = new RegExp(`${TOKEN}([^_]*)__`);

Expand Down

0 comments on commit e706ec2

Please sign in to comment.