batiste / pug-vdom

PUG template to HyperScript Virtual DOM
MIT License
18 stars 6 forks source link

Support block in code node. #37

Closed albb0920 closed 5 years ago

albb0920 commented 5 years ago

Related to https://github.com/batiste/pug-vdom/issues/36

This patch adds support for using block with code node.

For example:

- for (var x = 0; x < 3; x++)
  li item

PUG documentation: https://pugjs.org/language/code.html

--

BTW, I notice some tests no longer pass in my environment.

  1) Compiler Compiles a tag with buffered non-escaped string content.:
     TypeError: Cannot read property 'outerHTML' of undefined
      at Context.<anonymous> (test/basic.js:314:39)

  2) Compiler Compiles a tag with buffered non-escaped string content from local var.:
     TypeError: Cannot read property 'outerHTML' of undefined
      at Context.<anonymous> (test/basic.js:345:39)

  3) Compiler Compiles a tag containing HTML text line.:
     TypeError: Cannot read property 'outerHTML' of undefined
      at Context.<anonymous> (test/basic.js:361:39)
gryphonmyers commented 5 years ago

I think it's my bad! Unrelated to this PR. I'll fix them

On Sat, May 11, 2019, 7:27 PM Batiste Bieler notifications@github.com wrote:

@batiste requested changes on this pull request.

The tests should be fixed...

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/batiste/pug-vdom/pull/37#pullrequestreview-236373545, or mute the thread https://github.com/notifications/unsubscribe-auth/ABMENWGUKUJGB7XFEM47H4TPU2UTRANCNFSM4HJ4WRGA .

albb0920 commented 5 years ago

Sorry, I didn't explain too well. Yeah, these tests was broken before this PR.

Thanks!