Explorar o código

fix: handle raw mustache expressions over multiple lines

NGPixel %!s(int64=4) %!d(string=hai) anos
pai
achega
d75c5532d1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      server/modules/rendering/html-core/renderer.js

+ 1 - 1
server/modules/rendering/html-core/renderer.js

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