Skip to content

fix(parser): restore multiline code spans - #757

Open
awais-ur-rehman wants to merge 1 commit into
trentm:masterfrom
awais-ur-rehman:feat/multiline-code-spans
Open

awais-ur-rehman wants to merge 1 commit into
trentm:masterfrom
awais-ur-rehman:feat/multiline-code-spans

Conversation

@awais-ur-rehman

Copy link
Copy Markdown

Summary

Restore code spans that wrap onto the next line, including in safe mode. Keep the safe-mode protection matcher single-line so a later link-definition pass cannot expose an HTML tag hidden inside a multiline match.

Fixes #756.

Breaking Changes

None.

Testing

  • The multiline regression fails in all three safe modes before the change.
  • make testone: 304 tests pass, including the link-definition sanitization regression.
  • make test: available Python 3.11, 3.13 and 3.14 suites pass; optional extras are installed on 3.14 only.
  • make testredos: 12 tests pass. Changed-line PEP8 and git diff --check pass.

OpenAI Codex assisted with the implementation and test execution.

Comment thread test/test_markdown2.py
self.assertIn('<a href="#fn-second">1</a>', html)
self.assertIn('<li id="fn-second">', html)

def test_multiline_code_spans(self):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put this in test files in test/tm-cases please

Comment thread README.md
including an operator cell such as ```` ``|`` ````. A pipe immediately after the
closing delimiter separates the next cell.

Inline code spans can wrap onto the next line in hard-wrapped text. The

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this an important enough note to be in the readme?
I think it should be removed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Code spans that wrap onto the next line are no longer recognised (regression from the #702 fix)

2 participants