gemtext converters #13

Closed
opened 2023-01-14 17:49:32 +00:00 by tjp · 1 comment
Owner

customizable converters:

  • markdown
  • html

"customizable" in this context needs further definition, but one idea:

  • the conversion function accepts an any argument which can implement methods/interfaces to specify how each type of gemtext line should be converted.
  • there is a default implementation for each line type, so at a minimum the caller could pass nil and get a fully default conversion.

That's more flexible, but more work for the user than something simple like just supplying a optional HTML class names for nodes.

customizable converters: * markdown * html "customizable" in this context needs further definition, but one idea: * the conversion function accepts an `any` argument which can implement methods/interfaces to specify how each type of gemtext line should be converted. * there is a default implementation for each line type, so at a minimum the caller could pass `nil` and get a fully default conversion. That's more flexible, but more work for the user than something simple like just supplying a optional HTML class names for nodes.
tjp added the
enhancement
label 2023-01-14 18:05:30 +00:00
Author
Owner

or, OR, we could accept a text/template.Template for a markdown converter an an html/template.Template for the HTML converter. These should support blocks with specific names which can override the default output for each line type.

or, OR, we could accept a `text/template.Template` for a markdown converter an an `html/template.Template` for the HTML converter. These should support blocks with specific names which can override the default output for each line type.
tjp added reference gemtext-conversion 2023-01-15 02:59:20 +00:00
tjp closed this issue 2023-01-16 05:29:38 +00:00
tjp self-assigned this 2023-01-16 05:29:46 +00:00
This repo is archived. You cannot comment on issues.
No description provided.