Class: LLM::Shell::Markdown
- Inherits:
-
Object
- Object
- LLM::Shell::Markdown
- Defined in:
- lib/llm/shell/markdown.rb
Instance Method Summary collapse
Constructor Details
#initialize(text) ⇒ LLM::Shell::Markdown
11 12 13 |
# File 'lib/llm/shell/markdown.rb', line 11 def initialize(text) @document = Kramdown::Document.new preprocessor(text) end |
Instance Method Details
#to_ansi ⇒ String
17 18 19 |
# File 'lib/llm/shell/markdown.rb', line 17 def to_ansi @document.root.children.map { |node| visit(node) }.join("\n") end |