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

Fix block-curly injector leaving behind an empty <p></p>

This commit is contained in:
Trevor Buckner
2021-09-09 10:35:08 -04:00
parent d4ff87395f
commit f435d65db7
3 changed files with 7 additions and 4 deletions

View File

@@ -174,13 +174,16 @@ const mustacheInjectBlock = {
lastToken.originalType = 'mustacheInjectBlock';
lastToken.tags = ` ${processStyleTags(match[1])}`;
return {
type : 'text', // Should match "name" above
raw : match[0], // Text to consume from the source
type : 'mustacheInjectBlock', // Should match "name" above
raw : match[0], // Text to consume from the source
text : ''
};
}
},
renderer(token) {
if(!token.originalType){
return;
}
token.type = token.originalType;
const text = this.parser.parse([token]);
const openingTag = /(<[^\s<>]+)([^\n<>]*>.*)/s.exec(text);