TRIAEIOU / micromark-extension-attention

micromark extension to support single char attention markers

Home Page:https://unifiedjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

micromark-extension-attention

Forked from micromark-extension-gfm-strikethrough and modified to create single char emphasis style markers, e.g. underline. Requires mdast-util-attention.

Modifcations from micromark-extension-gfm-strikthrough

  • Create branch "attention"
  • html.js:
    • Parameterize gfmStrikethroughHtml to attentionHtml({mdastNodeName: str, hastNodeName: str})
    • Replace tag and function names
  • Syntax.js:
    • Prefer using char rather than char code, char code is only needed here so convert char from charCodeAt(0)
    • Parameterize gfmStrikethrough to attention({mdastNodeName: str, hastNodeName: str, char: str})
      • Convert single-or-double checks to single only.
      • Find all *strikethrough* strings and convert to constants set to relevant strings from opts
  • test.js:
    • Convert test cases, move fixture files into .ignore subfolder
  • Run task npm build
  • Push

About

micromark extension to support single char attention markers

https://unifiedjs.com

License:MIT License


Languages

Language:JavaScript 100.0%