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

W commentary #368

Open
vincent-peugnet opened this issue Nov 16, 2023 · 0 comments
Open

W commentary #368

vincent-peugnet opened this issue Nov 16, 2023 · 0 comments
Labels
enhancement New feature or request question Further information is requested render engine

Comments

@vincent-peugnet
Copy link
Owner

vincent-peugnet commented Nov 16, 2023

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.

@vincent-peugnet vincent-peugnet added enhancement New feature or request question Further information is requested render engine labels Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested render engine
Projects
None yet
Development

No branches or pull requests

1 participant