chirun-ncl / chirun

A Python package providing the command line interface for building flexible and accessible content with Chirun.
https://chirun.org.uk/
Other
29 stars 4 forks source link

Stripping comments from notebook content #118

Closed IanHawke closed 2 years ago

IanHawke commented 2 years ago

Is it possible to strip out comments from the markdown files that define the notebook content? I've tried using HTML-style comments (two or three dashes) which is meant to be compatible with StripHTML, but that's not working (I guess it's not run on the standard template/theme)?

georgestagg commented 2 years ago

Markdown comments of the form,

[comment]: # (This is a comment)

are stripped, although it is a bit of an abuse of markdown link labels.

I think you're right that standard HTML-style comments should also be stripped from the output, so I have enabled the stripHTML PyMdown extension (setup to strip HTML comments and nothing else), as of commit 953018d44cb39805a2c838ed4cf4118ae2316862.