Fix markdown-it text centering delmiter conflict - #2921
Conversation
|
Does it close #2716 as well? If so, can close that issue too! |
|
@gerteck yup it fixes that. Will update the description and add some screenshots |
|
Just checked, it doesn't fix the root cause of #2716 , let's keep it open, it's a vue hydration error that is quite hard to fix A good proxy to check is to check the 404 page... (https://deploy-preview-2921--markbind-master.netlify.app/404 ) Currently the markbind site 404 page is also broken: https://markbind.org/404 <frontmatter>
title: Page not found
layout: 404.md
</frontmatter>
-><p style="font-size: 10rem">404</p><-
-><p style="font-size: 1.5rem">File not found<br>Click <a href="/">here</a> to go back to the home page.</p><-but it properly fixes #2920 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2921 +/- ##
========================================
Coverage 71.32% 71.33%
========================================
Files 133 133
Lines 7234 7236 +2
Branches 1612 1714 +102
========================================
+ Hits 5160 5162 +2
+ Misses 2068 1973 -95
- Partials 6 101 +95 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@Incogdino Each PR must have a SEMVER impact label, please remember to label the PR properly. |
|
Thanks for the quick fix, @Incogdino 💯 |
|
@damithc v7.2.1 have been released including this patch. |
What is the purpose of this pull request?
Closes #2920
Overview of changes:
The plugin tagged its delimiters with the character code of
-(45) and<(60). Other double-delimiter rules (e.g. the--"small text" rule) also derive their marker fromcharCodeAt, so-collided with 45 too. Since inline rules share onestate.delimitersarray, the center-text post-processing pass grabbed unrelated delimiters and wrongly wrapped them in<div class="text-center">.Switched the plugin's markers to negative sentinels (-1/-2), where no real character code produces so they can't collide with any other rule.
Anything you'd like to highlight/discuss:
Testing instructions:
Added regression test combining the two rules.
npm run testinpackages/coredirectoryProposed commit message: (wrap lines at 72 characters)
Fix markdown-it text centering delmiter conflict
Checklist: ☑️
Reviewer checklist:
Indicate the SEMVER impact of the PR:
At the end of the review, please label the PR with the appropriate label:
r.Major,r.Minor,r.Patch.Breaking change release note preparation (if applicable):