diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-11-23 08:13:15 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-11-23 08:13:15 -0800 |
commit | 36d7aca943aef7a346f0529e0c54b74cb9710a5f (patch) | |
tree | f812ae6ae7b1171fc772fb6b6d999151e8f8eee7 /js/lib/blocks.js | |
parent | f7f010070d59bd2bd9334ef1f5f18e6d1631f9cc (diff) |
js: use 'CodeBlock' in AST for all code blocks.
Don't distinguish fenced, indented.
Diffstat (limited to 'js/lib/blocks.js')
-rw-r--r-- | js/lib/blocks.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/js/lib/blocks.js b/js/lib/blocks.js index cd42090..53fe2b9 100644 --- a/js/lib/blocks.js +++ b/js/lib/blocks.js @@ -566,6 +566,7 @@ var finalize = function(block, line_number) { case 'IndentedCode': block.string_content = block.strings.join('\n').replace(/(\n *)*$/,'\n'); + block.t = 'CodeBlock'; break; case 'FencedCode': @@ -576,6 +577,7 @@ var finalize = function(block, line_number) { } else { block.string_content = block.strings.slice(1).join('\n') + '\n'; } + block.t = 'CodeBlock'; break; case 'List': @@ -638,11 +640,10 @@ var processInlines = function(block) { newblock.list_data = block.list_data; newblock.tight = block.tight; break; - case 'FencedCode': + case 'CodeBlock': newblock.string_content = block.string_content; newblock.info = block.info; break; - case 'IndentedCode': case 'HtmlBlock': newblock.string_content = block.string_content; break; |