Repository navigation
Conversation
✅ Deploy Preview for prettier ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
commit: |
|
Still suspicious case: Prettier PR #19602 --parser markdownInput: > \>
> \>Output: > \> >\>
This is not a regression but stable Prettier also yields wired output for it. So I won't strongly reject this PR just because of it but it should be worth to inform you. |
|
Prettier PR #19602 --parser markdownInput: > *text* > \>Output: > _text_ > >\>
|
seiyab
left a comment
There was a problem hiding this comment.
Weakly approve this.
- 🟡 We need a new issue for #19602 (comment) and #19602 (comment) if we merge it as-is.
- 🟢 Problems above is not a regression. And this doesn't look to cause other regressions.
- 🟢 This PR resolves all cases reported in #19528 and make a progress at least.
fisker
left a comment
There was a problem hiding this comment.
@fede-oss Can you address the problems mentioned in #19602 (review)?
|
@fede-oss @fisker @seiyab I ran into the same bug from the other side: I opened #19726 for Why both of our patches miss those two cases Both versions keep the original substitution: return rawLine.replace(angleBracketsRegex, leadingTextAngleBrackets);Instrumenting Per line:
The guard only helps when the whole raw line has no marker, so it fixes the single-line What worked for me Strip only the markers that const rawAngleBrackets = rawLine.match(angleBracketsRegex)[0];
if (!rawAngleBrackets) {
return rawLine;
}
const valueLine = valueLines[index] ?? "";
const contentAngleBrackets = valueLine.match(angleBracketsRegex)[0];
const markerLength = Math.max(
0,
rawAngleBrackets.length - contentAngleBrackets.length,
);
return rawLine.slice(markerLength);The Results on the two blocking cases
Checked 10 inputs total - the three from #19528, both cases from your review comments, plus
How would you like to proceed? This PR already has @seiyab's approval and only needs those cases closed out, so the cleanest |
|
This PR won't be merged until the two cases that seiyab pointed out been addressed. The author of this PR seems not responding, you can continue work in #19726. |
|
Close due to lake of response. |
Description
Fixes #19528.
The Markdown blockquote preprocessor previously replaced an empty raw prefix with a parsed leading
>. When the source contained an escaped\>, that replacement inserted an extra unescaped angle bracket. This change skips blockquote-marker normalization when the raw line has no leading marker.The regression fixture covers plain, strong, and standalone escaped angle brackets under all supported
proseWrapmodes.Checklist
docs/directory). (Not applicable; no API or CLI change.)changelog_unreleased/*/XXXX.mdfile followingchangelog_unreleased/TEMPLATE.md.Tested with:
yarn jest tests/format/markdown --runInBand(60 suites, 1,554 tests)>before\>#19528