Browse Source

fix: handle raw mustache expressions over multiple lines

pull/3770/head 2.5.197
NGPixel 3 years ago
parent
commit
d75c5532d1
1 changed files with 1 additions and 1 deletions
  1. 2
      server/modules/rendering/html-core/renderer.js

2
server/modules/rendering/html-core/renderer.js

@ -250,7 +250,7 @@ module.exports = {
const list = $(node).contents().toArray() const list = $(node).contents().toArray()
list.forEach(item => { list.forEach(item => {
if (item.type === 'text') { if (item.type === 'text') {
const rawText = $(item).text()
const rawText = $(item).text().replace(/\r?\n|\r/g, '')
if (mustacheRegExp.test(rawText)) { if (mustacheRegExp.test(rawText)) {
$(item).parent().attr('v-pre', true) $(item).parent().attr('v-pre', true)
} }

Loading…
Cancel
Save