posthtml / posthtml-expressions

Use variables, JS-like expressions, and even markup-powered logic in your HTML.
Other
123 stars 20 forks source link

Messages #37

Closed michael-ciniawsky closed 6 years ago

michael-ciniawsky commented 7 years ago

Problem

The current implementation overrides tree.messagesand results in result.messages === undefin ed

Details

Seems to be caused by the custom walk function

Issue [ Code ]

$ git clone https://github.com/michael-ciniawsky/posthtml
$ git checkout messages

Environment

OS Node npm PostHTML
macOS 10.12.2 7.3.0 3.10.10 michael-ciniawsky/posthtml.git#messages
mrmlnc commented 7 years ago

Because we use throw instead of tree.messages 😄

michael-ciniawsky commented 7 years ago

@mrmlnc :trollface: 😛

Sure but it overrides tree.messages completely so all messages from other plugins used before posthtml-expressions are lost at the moment 😭

andreyvolokitin commented 6 years ago

@michael-ciniawsky could this be a suitable fix? https://github.com/andreyvolokitin/posthtml-expressions/commit/4b65003ca009b24876e5ebf655af87eba0b1b97e