Commit a53f2dc
committed
fix(seo): handle multi-line yaml block scalar in surgical edit
Vercel build 在 PR 341 fail,根因:surgical edit 没考虑 title 用 YAML
folded/literal block scalar(>- / |- / >+ 等)时的多行续行。
case:
---
title: >-
line 1
line 2
date: "..."
---
之前逻辑在第一个顶级键(title:)行后直接插入 description:,把 title
的续行变成 dangling indented text,js-yaml 报 "bad indentation of a
mapping entry"。
修:找 insert 位置时也吃缩进/空行续行,与 description 块检测同样处理。
顺手修复 2309 文件被先前 bug 改坏的 frontmatter。
另外 142 / 1545 两个 mdx 是 prebuild escape-angles.mjs 跑出来的产物
(转义 markdown 文本里的 <、>),一起提交进来防止 build 时反复变更。1 parent 3132871 commit a53f2dc
3 files changed
Lines changed: 23 additions & 5 deletions
File tree
- content/docs/career/interview-prep/leetcode
- scripts
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
467 | | - | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
468 | 475 | | |
469 | 476 | | |
470 | 477 | | |
471 | | - | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
472 | 490 | | |
473 | 491 | | |
474 | 492 | | |
| |||
0 commit comments