diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2025-02-21 12:42:55 -0500 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2025-02-21 12:42:57 -0500 |
commit | 0b2bb143e4512e0c78d4e2efdb9161772d54459c (patch) | |
tree | fdc5b0230674c6f1d69ab39b2ce22324a7ad8e87 /org/in_source_files.org | |
parent | 0.18.0 (diff) |
triple single-quote marks block identifier added
- tics a bit cumbersome where single quotes work
just as well
- testing required (special cases not covered)
- diverges from sisu markup which will need an
update sometime
Diffstat (limited to 'org/in_source_files.org')
-rw-r--r-- | org/in_source_files.org | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/org/in_source_files.org b/org/in_source_files.org index 700b551..cdd220f 100644 --- a/org/in_source_files.org +++ b/org/in_source_files.org @@ -581,7 +581,7 @@ final char[][] getInsertMarkupSourceContentRawLineArray( #+BEGIN_SRC d char[][] contents_insert; int code_block_status = 0; -enum codeBlock { off, curly, tic, } +enum codeBlock { off, curly, tic, quotemarks } auto fn_pth_full = fn_src.match(rgx_files.src_pth_sst_or_ssm); auto markup_src_file_path = fn_pth_full.captures[1]; #+END_SRC @@ -598,11 +598,19 @@ if (code_block_status == codeBlock.curly) { } else if (line.matchFirst(rgx.block_curly_code_open)) { code_block_status = codeBlock.curly; contents_insert ~= line; +} else if (code_block_status == codeBlock.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + code_block_status = codeBlock.off; + } + contents_insert ~= line; } else if (code_block_status == codeBlock.tic) { if (line.matchFirst(rgx.block_tic_close)) { code_block_status = codeBlock.off; } contents_insert ~= line; +} else if (line.matchFirst(rgx.block_quotemarks_code_open)) { + code_block_status = codeBlock.quotemarks; + contents_insert ~= line; } else if (line.matchFirst(rgx.block_tic_code_open)) { code_block_status = codeBlock.tic; contents_insert ~= line; @@ -666,7 +674,7 @@ return ret; #+BEGIN_SRC d char[][] contents; int code_block_status = 0; -enum codeBlock { off, curly, tic, } +enum codeBlock { off, curly, tic, quotemarks } auto fn_pth_full = fn_src.match(rgx_files.src_pth_sst_or_ssm); auto markup_src_file_path = fn_pth_full.captures[1]; char[][] contents_insert; @@ -686,11 +694,19 @@ if (code_block_status == codeBlock.curly) { } else if (line.matchFirst(rgx.block_curly_code_open)) { code_block_status = codeBlock.curly; contents ~= line; +} else if (code_block_status == codeBlock.quotemarks) { + if (line.matchFirst(rgx.block_quotemarks_close)) { + code_block_status = codeBlock.off; + } + contents ~= line; } else if (code_block_status == codeBlock.tic) { if (line.matchFirst(rgx.block_tic_close)) { code_block_status = codeBlock.off; } contents ~= line; +} else if (line.matchFirst(rgx.block_quotemarks_code_open)) { + code_block_status = codeBlock.quotemarks; + contents ~= line; } else if (line.matchFirst(rgx.block_tic_code_open)) { code_block_status = codeBlock.tic; contents ~= line; |