-
-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adds css front matter escapes #814
Conversation
I would merge. :) 👍 |
Accomplished this is in a different way with v6.66.0. Thanks a bunch for pushing for this. It's now out and really cool! |
- Meta header seperators can now contain additional characaters, providing there is still a character that repeats at least 3 times This allows you to do things like: ``` /* --- works: "yes" --- */ window.alert(<%- @document.works %>) ``` Or even more concisely: ``` /*** works: "yes" ***/ window.alert(<%- @document.works %>) ``` Big thanks to [pflannery](https://github.com/pflannery) for pushing for this with [#814](#814)
Great thanks ben!! |
This completely breaks all of my SCSS files in DocPad as I've been using
for as long as I can remember to mark section within a file. It took me a while to find out it was due to this new feature in DocPad. Is there anyway this feature can be switched off? |
@tbusser as long as your file doesn't start with one of your section headers you're fine, if you add a comment or something to the top of the file and you'll be good. There is currently no way to turn this feature off, nor will it probably be a priority due to the increased complexity vs the workaround just mentioned. |
@balupton Unfortunately my files do start with such a header comment. I understand this is not a big priority, just not too happy about having to alter all my files so my project will build again. It would've been nice if the check was for a repetition of three chars and evaluate to false when it is more than 3 (point me in the right direction, as to which file to look into, and I'll have a crack at it myself). |
The problem with this is it trades one break for another. There's definitely a few people out there who use more than 3 chars for there meta data headers. I think doing an option to suppress the error may be an option? |
I have a scenario with sass files where if front matter exists in a scss file and I then try to compile it outside of docpad an error "Syntax error: Invalid CSS after "-": expected number or function, was "--cson""
This is caused by sass not being able to recognise the 3 char front matter sequences like ### or ---.
I've created a solution that escapes the front matter using css commenting like this:
The advantages of this also allows sass\css editors to render the document correctly without reporting errors and discolouring the output.