Code Block Start Mode: Normal/AsComment

Use case or problem

I would like to set the start mode of a code block as Normal or Comment

Proposed solution

After the ```Language Name Here It would be nice to add : Normal or : OpenComment

This in combination with a modification to templater (adding <%* plus the languages comment character set before and the languages comment character *%> after the Templater note it when executing) we can engage in the practice of literate programming with our documentation in looking like any other Markdown note in Reading/Editing mode (no random symbols at the beginning or ending of the note to make it functional), while being interpreted differently.

Example: Templater prepends <%* /* and appends /%> and the note only contains the below items.

Heading Level 1

Heading Level 2

This code block does nothing, it is just a pseudo code to show why I would want to run a JavaScript command within Templater’s normal context not as a user/script function with a file as an ingest “variable”. This lets me use Editing/Reading mode normally with my Templator only executing the items in the codeblocks. This would work because I would ingest everything as a String comment without escape characters allowed and then only execute the JS/Templator commands in the codeblocks.

*/
var Test = String.raw
/*

Current workaround (optional)

Obsidian workaround listed below, doesn’t keep the look I want in Edit/WYSWG mode and still shows the first and last line in the display.

<%* /*

Heading Level 1

Heading Level 2

This code block does nothing, it is just a pseudo code to show why I would want to run a JavaScript command within Templater’s normal context not as a user/script function with a file as an ingest “variable”. This lets me use Editing/Reading mode normally with my Templator only executing the items in the codeblocks. This would work because I would ingest everything as a String comment without escape characters allowed and then only execute the JS/Templator commands in the codeblocks.

*/
var Test = String.raw
/*

/%>