wcms
wcms copied to clipboard
W commentary
Would it be a good idea to add a syntax for commentary that will be escaped in the outputted in the HTML ?
It's one more W specific syntax. Maybe other CMS have implemented this feature ? Is there a common practice for Markdown commentary (like for internal wiki links [[my-page]]
)
Currently HTML comments <!-- -->
are included in the output HTML.
A stackoverflow discussion about it :
https://stackoverflow.com/questions/4823468/comments-in-markdown
To be honest, there is a way of doing it currently:
[comment]: # (comment escaped from HTML output)
But I don't find it very use-full as it is not multi-line and quite complicated.
Pandoc seems to use an interesting approach ref, by extending the HTML comment syntax :
<!--- comment escaped from HTML output -->
They use a triple dash ---
to differentiate it from HTML commentary.
It seems that they also have this synthax ref : $--
.
If it would be more W style, I could use the percent %
sign which is the most associated symbol. Let's imagine a mix of HTML and W. As in the Pandoc discussion, a negative point emitted is that the third dash is too discreet.
<!--% comment escaped from HTML output %-->
Or, using W style only, this would looks like:
%%%
comment escaped from HTML output
%%%
A last idea: A BODY option that remove HTML comments. Like this:
%CONTENT?remove_comment=1%
But I'm not a big fan neither, as it remove the ability to combine both HTML and non-HTML comments in a W Page.