Skip to content

Переводы строк в i18n:msg вызывают исключение #119

Description

@ogonkov

Подобная конструкция

<?xml version="1.0" encoding="UTF-8"?>
<fest:template xmlns:fest="http://fest.mail.ru" xmlns:i18n="http://i18n.fest.mail.ru">
    <i18n:msg>foo
        bar</i18n:msg>
</fest:template>

Вызывает при сборке исключение

Compiling "template.xml" to "template.js"...
>> Error: 3:     <fest:value output="text">i18n("foo
>> 4:         bar");</fest:value>
>> 5: </fest:template>
>> At line 4: node has SyntaxError: Unexpected token ILLEGAL
>>   at /Users/user/Projects/biz/node_modules/grunt-fest/node_modules/fest/lib/compile.js:201:11
>>   at Object.parser.ontext.parser.oncdata (/Users/user/Projects/biz/node_modules/grunt-fest/node_modules/fest/lib/compile.js:690:23)
>>   at emit (<anonymous>:322:32)
>>   at closeText (<anonymous>:332:23)
>>   at emitNode (<anonymous>:326:23)
>>   at closeTag (<anonymous>:539:3)
>>   at Object.write (<anonymous>:948:25)
>>   at _compile (/Users/user/Projects/biz/node_modules/grunt-fest/node_modules/fest/lib/compile.js:712:11)
>>   at finish_compile (/Users/user/Projects/biz/node_modules/grunt-fest/node_modules/fest/lib/compile.js:859:19)
>>   at Fest.compile (/Users/user/Projects/biz/node_modules/grunt-fest/node_modules/fest/lib/fest.js:50:9)
>>   at /Users/user/Projects/biz/node_modules/grunt-fest/tasks/fest.js:61:32
>>   at Array.forEach (native)
>>   at /Users/user/Projects/biz/node_modules/grunt-fest/tasks/fest.js:35:19
>>   at Array.forEach (native)
>>   at Object.<anonymous> (/Users/user/Projects/biz/node_modules/grunt-fest/tasks/fest.js:34:20)
>>   at Object.<anonymous> (/Users/user/Projects/biz/node_modules/grunt/lib/grunt/task.js:255:15)
>>   at Object.thisTask.fn (/Users/user/Projects/biz/node_modules/grunt/lib/grunt/task.js:73:16)
>>   at Object.<anonymous> (/Users/user/Projects/biz/node_modules/grunt/lib/util/task.js:294:30)
>>   at Task.runTaskFn (/Users/user/Projects/biz/node_modules/grunt/lib/util/task.js:244:24)
>>   at Task.<anonymous> (/Users/user/Projects/biz/node_modules/grunt/lib/util/task.js:293:12)
>>   at /Users/user/Projects/biz/node_modules/grunt/lib/util/task.js:220:11
>>   at nextTickCallbackWith0Args (node.js:420:9)
>>   at process._tickCallback (node.js:349:13)
>>   at Function.Module.runMain (module.js:443:11)
>>   at startup (node.js:139:18)
>>   at node.js:974:3
Fatal error: Can't compile template.xml

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions