Skip to content
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

HTML and XHTML modes should use comments #50

Open
flaviotordini opened this issue Jul 28, 2020 · 0 comments
Open

HTML and XHTML modes should use comments #50

flaviotordini opened this issue Jul 28, 2020 · 0 comments

Comments

@flaviotordini
Copy link

flaviotordini commented Jul 28, 2020

I just discovered gpp and I love it. I am mostly surprised that HTML and XHTML modes do not use comments in their syntax. I think the main point of a preprocessor is allowing removal of some code based on some condition without making the document invalid. HTML mode should look like:

<!-- #ifdef MYDEFINE -->
<p>optional paragraph</p>
<!-- #endif -->

This preserves document validity and well-formedness. Allows for reformatting, rendering, etc.

I understand changing the modes would break compatibility. What about adding a new mode?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants