0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-28 02:42:39 +00:00

escape tokenization of injection if preceded by another injection.

This commit is contained in:
Gazook89
2023-03-24 15:15:08 -05:00
parent 97f5a17d10
commit 6a95ed57ca

View File

@@ -134,7 +134,7 @@ const mustacheInjectInline = {
const match = inlineRegex.exec(src);
if(match) {
const lastToken = tokens[tokens.length - 1];
if(!lastToken)
if(!lastToken || lastToken.type == 'mustacheInjectInline')
return false;
const tags = ` ${processStyleTags(match[1])}`;
@@ -169,7 +169,8 @@ const mustacheInjectBlock = {
const match = inlineRegex.exec(src);
if(match) {
const lastToken = tokens[tokens.length - 1];
if(!lastToken)
console.log(lastToken);
if(!lastToken || lastToken.type == 'mustacheInjectBlock')
return false;
lastToken.originalType = 'mustacheInjectBlock';