|
|
|||
Warning, file /tutorial-analysis/bin/markdown_ast.rb was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 #!/usr/bin/env ruby 0002 # frozen_string_literal: true 0003 0004 # Use Kramdown parser to produce AST for Markdown document. 0005 0006 require 'kramdown' 0007 require 'kramdown-parser-gfm' 0008 require 'json' 0009 0010 markdown = $stdin.read 0011 doc = Kramdown::Document.new(markdown, input: 'GFM', hard_wrap: false) 0012 tree = doc.to_hash_a_s_t 0013 puts JSON.pretty_generate(tree)
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|