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
Verbose mode breaks in html files with css comments #37
Comments
@afterwind-io I'm not sure if that fix you did works, based off of the test case you made. <div>
<!-- #!if TEST -->
<style>
/* NOT ME */
</style>
<!-- #!endif -->
</div> It would be converted to: <div>
<!-- #!if TEST -->
<!-- <style> -->
/* NOT ME */
<!-- </style> -->
<!-- #!endif -->
</div> which means the I don't know if I am correct in that assumption, as I haven't tested the changes yet, but it seems like that's what will happen based on the test case added in the commit. |
@tech-meppem <div>
<!-- #!if TEST -->
<!-- <style> -->
<!-- /* NOT ME */-->
<!-- </style> -->
<!-- #!endif -->
</div> Those normal comments will be wrapped in another redundant comment, just like what editors do, to solve the problem without the context of language-shifting things. |
Fixed in 1.2.1 |
@tech-meppem |
Using verbose mode in HTML files has unexpected problems, when using comments in a
<style>
block.If you have a css comment such as
/* comment */
, verbose mode switches to use that style of comment for the remainder of the "block" of commented out code.For example:
TEST = false
the output becomes:
Which aren't html comments, and as such, the "div1" div is still rendered, although without the styling.
Putting a comment like:
does sort of fix it, but it's not a great solution
Is there a feature that we can disable verbose mode for a block / for the singular file / for html files only?
The text was updated successfully, but these errors were encountered: