Trailing spaces and tabs are preserved at the end of paragraphs
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 25/100
Research direction
Start by checking how Marko parses paragraph raw content before inline parsing, then compare that behavior with CommonMark 0.31.2 section 4.8. Use the reproducer in the issue to check both trailing spaces and tabs; done means both are absent from the converted paragraph output. Pull request #324 is already open for this issue.
Written by the indexing model from the issue text.
Description
Description
Marko preserves trailing spaces and tabs at the end of a paragraph,
although CommonMark requires these characters to be removed before
inline parsing.
Reproducer
import marko
print(repr(marko.convert("a ")))
print(repr(marko.convert("a\t")))
Actual output:
'<p>a </p>\n'
'<p>a\t</p>\n'
Expected output:
'<p>a</p>\n'
'<p>a</p>\n'
Expected behavior
Trailing spaces and tabs should be removed from the paragraph's raw
content before inline parsing, as specified in CommonMark 0.31.2,
section 4.8:
https://spec.commonmark.org/0.31.2/#paragraphs
Versions tested
- Marko 2.2.5
- Master commit
bff68422520dd21e3f789c7266665a1cdbae47c1
Found through differential testing.
- Dominant language
- Python
- Stars
- 470
- Forks
- 72
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 34
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from frostming/marko
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
GFM elements (strikethrough, tables, alerts, bare autolinks) crash the LatexRenderer with NotImplementedErrorPossibly taken @rahul05ranjan claimed this 4 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
frostming/marko#105 · 4 reactions ·
Maintainers usually reply within 1 day
Similar issues
-
AI bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
AUTO-MAS-Project/AUTO-MAS#1960 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
btclib-org/btclib-wallet#872 ·
Maintainers usually reply within 1 day
-
[Bug]: Scheduled returns scan all accepted minion keys causing extreme loadPossibly taken A pull request linked to this issue is open or already merged. Openbug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
saltstack/salt#70789 · 1 comment ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
btclib-org/btclib#3093 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day