Module: HtmlToMarkdown
- Defined in:
- lib/html_to_markdown.rb,
lib/html_to_markdown/version.rb,
ext/html_to_markdown_rb/src/html-to-markdown.rb,
ext/html_to_markdown_rb/src/html-to-markdown/version.rb
Overview
This file is auto-generated by alef — DO NOT EDIT. alef:hash:ea7b0309f2a6d285c48e922b5178305805266a4f1e223cf91395e98065c881a1 To regenerate: alef generate To verify freshness: alef verify –exit-code Issues & docs: github.com/kreuzberg-dev/alef frozen_string_literal: true
Constant Summary collapse
- VERSION =
"3.4.0.pre.rc.21"
Class Method Summary collapse
-
.convert(html, options = {}, visitor = nil) ⇒ String
Convert HTML to Markdown.
Class Method Details
.convert(html, options = {}, visitor = nil) ⇒ String
Convert HTML to Markdown.
32 33 34 35 36 37 38 39 |
# File 'lib/html_to_markdown.rb', line 32 def self.convert(html, = {}, visitor = nil) # The Rust FFI expects options as a JSON string; serialise the hash here # rather than constructing a ConversionOptions object, which the generated # FFI layer cannot coerce back to String (see issue #334). opts_json = .nil? || .empty? ? nil : .to_json result = HtmlToMarkdownRs.convert(html, opts_json, visitor) result.content || '' end |