updates to markdown processing to allow custom elements

This commit is contained in:
2023-05-11 18:02:40 -07:00
parent 44315b324a
commit 3ddde81e1c
5 changed files with 43 additions and 32 deletions

View File

@@ -90,6 +90,8 @@ function code(renderer: marked.Renderer, opts: MarkdownOptions) {
case 'bash:samp': {
// Find the first newline that is not preceeded by a "\"
const end_of_input = /(?<!\\)(?:\r\n|\r|\n)/.exec(code);
// todo: handling for multi-line heredocs?
// If there is no such newline, the whole content is input
if (! end_of_input) {