lit
lit copied to clipboard
configurable token to demarcate code blocks
Currently lit
always assumes it is processing GitHub Flavored Markdown documents in which code and prose are distinguished with triple backticks. Allowing the user to specify an alternative token with a command line argument would enable literate programming using other document formats. Parsing LaTeX and HTML would require a sort of "soft match" mode in which the presence of part of the token would trigger a match, so that e.g. specifying the token pre>
could be used to match both opening <pre>
and closing </pre>
. (Supporting the tab-indented code formatting of non-GitHub original Markdown would require dramatically different logic throughout and as a result should not be considered part of this feature proposal.)
Adding this feature would make the input document format configurable just like the programming language, which furthers the goal of making prose and code equal partners.