Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Text lost after an unclosed *** (regression in 3.11.1) #1694

Closed

Description

@lbesson

Since 3.11.1, some emphasis sequences after an unclosed *** drop characters from the output. 3.11 and earlier keep all the text.

import markdown
markdown.markdown('***l* * **e**')
version output
3.11 <p><strong><em>l</em> * </strong>e**</p>
3.11.1, 3.11.2, 3.11.3 <p>**<em>l</em> <strong>*</strong>**</p> (the e is lost)

The same happens across a line break ('***l*\n* **e**'). A case closer to real text:

markdown.markdown('***Le souffle** : x\n* **Amor Fati** : rectiligne')
# 3.11.3: '<p>*<strong>Le souffle</strong> : x\n<strong>**Amor Fa</strong>** : rectiligne</p>'

Here ti is lost from "Amor Fati".

This comes from user content on a site that renders Markdown with Python-Markdown. In a sample of about 28,000 real documents, 2 fields lose text this way with 3.11.3. All the other emphasis differences we saw from 3.10.3 keep the text.

Activity

  1. lbesson commented on Nov 6, 2026

    @lbesson
    Author

    Closing: this comes from a couple of very old documents with malformed markup on our side; we'll fix them in our content instead. Sorry for the noise.

  2. facelessuser commented on Nov 6, 2026

    @facelessuser
    Collaborator

    While these are not common usage, this exposes a cache position miscalculation that my fuzzed tests did not catch. I will have a fix up today.

  3. facelessuser commented on Nov 7, 2026

    @facelessuser
    Collaborator

    I've been under the weather today, so I'll likely not get the solution pushed today, but I've identified the issue. This exposed some issues that we have to work around related to our tracking and how Python Markdown parses things. 90% of the time, everything works as expected, but there is a certain category of cases we have to account for. I have a fix locally that I need to clean up, but it looks like it should handle these dropped-text cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions