code snippets
I need the ability to add short code snippets into my notes. There are countless times where a short code snippet without formatting <pre> tags surrounding it would be extremely beneficial. If there were to be syntax highlighting it would be nice but definitely not something thats extremely important. A good example is a very short bash script that starts looks like:
#!/bin/bash
echo "Welcome to moo.do"
echo "Test echo line 2"
and looks like this in moo.do apps and webui (terrible for more than 1 / 2 lines:
#!/bin/bash echo "Welcome to moo.do" echo "Test echo line 2"
Based on the above snippet although easy to read as a unformatted multi line string in monotype font with proper line breaks, it is extremely hard to read when html tries to format it and the \n line breaks do not translate to <br>.
Please please please add generic code snippets via either the back tick to initiate and back tick to end or even 3 of them which has become common place. An example where ``` just gets replaced with <pre> and the secondary pre gets replaced with </pre> or even [code].... [/code]:
echo "The quick brown fox"
echo "Jumps over the lazy dog"
-
Eric Schultz commented
Markdown supports code snippets, https://commonmark.org/help/. Moo.do just needs to include more of Markdown formatting.