Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pulldown-cmark/pulldown-cmark
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: pulldown-cmark/pulldown-cmark
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: html-blocks-1through5-fixes
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 5 commits
  • 4 files changed
  • 2 contributors

Commits on Oct 7, 2026

  1. Match HTML block end tags case-insensitively

    An HTML block that starts with `<pre`, `<script`, `<style` or `<textarea`
    ends at a line containing `</pre>`, `</script>`, `</style>` or
    `</textarea>`, and the spec makes that match case-insensitive (4.6, start
    condition 1: "case-insensitive; it need not match the start tag"). The
    end tag was found with a case-sensitive `contains`, so `<script>` closed
    by `</SCRIPT>` (or `<PrE>` by `</pRe>`) did not end the block: every
    following line, up to a lowercase end tag or the end of the document,
    became raw HTML, including Markdown after a blank line. cmark and
    commonmark.js end the block there.
    yuxi-liu-wired committed Oct 7, 2026
    Configuration menu
    Copy the full SHA
    b84b706 View commit details
    Browse the repository at this point in the history
  2. End an HTML block at any of the four type 1 end tags

    A block that starts with `<pre`, `<script`, `<style` or `<textarea`
    ends at a line containing `</pre>`, `</script>`, `</style>` or
    `</textarea>`; the end tag "need not match the start tag" (spec 4.6,
    type 1). Only the start tag's own end tag was looked for, so in
    
        <script>
        x
        </TEXTAREA>
        *y*
    
    the block went on to the end of the document; cmark and commonmark.js
    end it at `</TEXTAREA>` and render `<p><em>y</em></p>`.
    
    Look for all four.
    yuxi-liu-wired committed Oct 7, 2026
    Configuration menu
    Copy the full SHA
    a646892 View commit details
    Browse the repository at this point in the history
  3. Scan for type 1 HTML block end tags with memchr

    Per review: instead of sliding a window over the line once per tag, jump
    between the `<`s with memchr and check all four end tags at each one, in a
    single pass. On lines typical of script/pre/style blocks this is about 6x
    faster than the windowed scan (39 vs 225 ns per line; checking the four
    tags in separate memchr passes is 94 ns). The other end conditions (`-->`,
    `?>`, `]]>`, `>`) have no letters, so they are matched exactly.
    yuxi-liu-wired committed Oct 7, 2026
    Configuration menu
    Copy the full SHA
    4ffa718 View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2026

  1. Configuration menu
    Copy the full SHA
    45b4c2c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    604ed18 View commit details
    Browse the repository at this point in the history
Loading