Class: Protos::Markdown::AST
- Inherits:
-
Object
- Object
- Protos::Markdown::AST
- Defined in:
- lib/protos/markdown/ast.rb
Defined Under Namespace
Classes: Node
Class Method Summary collapse
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
-
#initialize(root) ⇒ AST
constructor
A new instance of AST.
Constructor Details
Class Method Details
.parse(content, markdown_options: {}) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/protos/markdown/ast.rb', line 20 def self.parse(content, markdown_options: {}) = { render: { gfm_quirks: true }, extension: { table: true }, ** } Commonmarker .parse(content, options:) .then { |node| new(Node.new(node)) } end |