Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

Fix #86, deIndent template code before preprocessing #90

Merged
merged 5 commits into from
May 12, 2017

Conversation

HerringtonDarkholme
Copy link
Member

Fixes #86. This should give template preprocessor more consistent code. vue-template-compiler also deindent before preprocessing.

/ping @znck

@@ -1,3 +1,3 @@
var pug = { template: "<div class=\"pug__test keep-me\"><article><p>foo</p></article></div>",cssModules: {"test":"pug__test"},};
var pug = { template: "<div class=\"pug__test keep-me\" v-if=\"true\"><article><p>foo</p></article></div><p v-else=\"v-else\">nothing</p>",cssModules: {"test":"pug__test"},};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does v-else correctly work here? It seems pug cannot know v-else is a boolean attribute but Vue compiler does not care. I'm not a pug user personally. Maybe @aleksejevski can give a comment.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need specify doctype option for pug compiler.
https://pugjs.org/language/doctype.html#doctype-option

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I don't know that!

@HerringtonDarkholme HerringtonDarkholme requested a review from znck May 12, 2017 03:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants