Skip to content

0.6.0

Choose a tag to compare

@peaceroad peaceroad released this 10 Feb 10:55
· 25 commits to main since this release
  • Breaking: insideHtml behavior was removed (the option is now effectively ignored).

    • In 0.4.1, insideHtml: false could keep markers unconverted inside inline HTML text nodes.
    • Now, insideHtml: true/false behaves the same.
    Input (html:true): <span>★x★</span>
    
    0.4.1 with insideHtml:false:
    <p><span>★x★</span></p>
    
    Now (insideHtml false/true/no option):
    <p><span><span class="star-comment">★x★</span></span></p>
  • Breaking: html:false switched to preparse-first marker handling.

    • Marker pairing now has higher priority in plain markdown mode.
    • Crossed markdown formatting markers are kept literal inside comment spans.
    Input (html:false): **spring★dish**set★menu
    
    0.4.1:
    <p><strong>spring<span class="star-comment">★dish</strong>set★</span>menu</p>
    
    Now:
    <p>**spring<span class="star-comment">★dish**set★</span>menu</p>
  • Breaking: html:true now uses preparse-first marker handling for inline mode (same model as html:false).

    • Marker ranges are fixed before markdown inline formatting is applied.
    • Markdown syntax inside ★...★ / %%...%% is kept literal.
    Input (html:true): **pre★A**B★post
    
    0.4.1:
    <p><strong>pre<span class="star-comment">★A</strong>B★</span>post</p>
    
    Now:
    <p>**pre<span class="star-comment">★A**B★</span>post</p>
  • Breaking: markdown features inside comment markers no longer render as markdown in inline mode.

    • This applies to emphasis, inline code, links, and similar inline syntax.
    Input (html:true): ★**bold**★ / ★`code`★ / ★[link](https://example.com)★
    
    0.4.1:
    <p><span class="star-comment">★<strong>bold</strong>★</span> / <span class="star-comment">★<code>code</code>★</span> / <span class="star-comment">★<a href="https://example.com">link</a>★</span></p>
    
    Now:
    <p><span class="star-comment">★**bold**★</span> / <span class="star-comment">★`code`★</span> / <span class="star-comment">★[link](https://example.com)★</span></p>
  • Breaking: delete options are now independent.

    • starCommentDelete no longer deletes percent comments.
    • percentCommentDelete only affects %%...%%.
    Options: { starComment:true, percentComment:true, starCommentDelete:true }
    Input: pre%%P%%mid★S★post
    
    0.4.1:
    <p>premidpost</p>
    
    Now:
    <p>pre<span class="percent-comment">%%P%%</span>midpost</p>
  • Behavior/Safety change: html:false ruby-wrapper handling is stricter.

    • Unsafe wrapper tags are escaped.
    • Ruby shorthand conversion still applies safely.
    Input (html:false): note:<ruby onmouseover=alert(1)>W3C《doubleu》</ruby>
    
    0.4.1:
    <p>note:<ruby onmouseover=alert(1)>W3C《doubleu》</ruby></p>
    
    Now:
    <p>note:&lt;ruby onmouseover=alert(1)&gt;<ruby>W3C<rp>《</rp><rt>doubleu</rt><rp>》</rp></ruby>&lt;/ruby&gt;</p>
  • Breaking (integration-level): paragraph-wrapper handling moved from renderer overrides to core token adjustment.

    • Output is usually the same.
    • Plugin interaction points changed (better coexistence with paragraph renderer plugins).
  • Internal: rule-order guard moved to core-ruler mutator guard.

    • Improves stability when plugins are added later.
    • Plugins that directly mutate core.ruler.__rules__ can still bypass ordering.