gpp icon indicating copy to clipboard operation
gpp copied to clipboard

HTML and XHTML modes should use comments

Open flaviotordini opened this issue 4 years ago • 0 comments

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?

flaviotordini avatar Jul 28 '20 15:07 flaviotordini