Omikhleia/markdown.sile

Correctly implement highlight(mark)/insertions/deletions with styling support

Omikhleia opened this issue · 2 comments

The current implementation for "highlight" a.k.a. "mark" (that is, =inline= in Markdown, {=inline=} in Djot -- additionally also supported as a .mark pseudo-class) , is just a placeholder (hard-coded to show the text in red, with a big FIXME TODO We'd need real support in the code.

What I'd want here is:

  • Some background color by default as fallback, now that we have "liners" spanning multiple lines (in SILE develop branch for 0.15 and likewise in sile-x.
  • Some style-enabled variant when used in resilient styling context, and the latter needs to be upgraded to accept:
    • Customizing the color via a style
    • Possibly to customize the rendering: rather than a rectangular box, use ptable.sile 's "rough" support in order use some sketchy variants (so as to make the text look as manually highlighted)
      • Needs support in ptable.sile for a rough highlight liner
      • Needs support in resilient.sile for a custom style

As for the "default fallback", perhaps it makes sense to propose to SILE's rules packages two easy additions:

  • a "highlight" "marked" liner (= background color below the text)
  • a "redacted" liner (= above the text and not rendering it)

EDIT: Scrap that. I'd need style-enabled versions of these anyway, so cannot avoid a resilient version eventually.

But note that Djot's deletions and insertions where also kind of hard-coded fallbacks and would also need to be properly re-implemented.