The GitHub Actions job "CI" on 
rocketmq-dashboard.git/fix/ai-markdown-thematic-break has succeeded.
Run started by GitHub user lizhimins (triggered by lizhimins).

Head commit for run:
c5d6740f82563e1836acd6fb704d5293492fe431 / lizhimins <[email protected]>
fix(ai): guard the heading and bullet repairs against well-formed markers

The upstream PR guarded the two repair regexes in the old whole-content, /gm
implementation. Trunk has since rewritten normalizeAiMarkdown into a fence-aware
line-by-line pass, so those two literals no longer exist there and the 
cherry-pick
could not carry the change over. Port the same two guards onto the line-by-line
version instead of rebasing the contributor branch:

- `^(#{1,6})(?=\S)` -> `^(#{1,6})(?=[^\s#])`: a plain (?=\S) lookahead lets the
  engine backtrack `#{1,6}`, so a WELL-FORMED `## heading` matched as one `#`
  followed by `#` and was rewritten to `# # heading`, corrupting every level-2+
  heading in an assistant answer.
- `^([-+*])(?=\S)` -> `^([-+*])(?!\1\1)(?=\S)`: `---`/`+++`/`***` are thematic
  breaks (and `---` under a title line is a setext heading); they must not be
  rewritten into a bullet with stray markers.

The `g`/`m` flags stay off - the line-by-line pass already anchors per line. The
fence-info-string repair is untouched. Verified with the PR's new 
markdown.test.ts
(4 cases) and trunk's markdownFences.test.ts (10 cases).

Report URL: 
https://github.com/apache/rocketmq-dashboard/actions/runs/39247990993

With regards,
GitHub Actions via GitBox

Reply via email to