pilichoumao opened a new issue, #6879: URL: https://github.com/apache/rocketmq-dashboard/issues/6879
### Studio Version and Runtime `rocketmq-studio` at a92c23144408cdf5729707050e9ecd9b75f1bad0. Reproduced on Ubuntu Linux with Node 20.20.2 / Vitest 4.1.10 and the real ReactMarkdown renderer. No model, database or Broker is needed. ### Describe the Bug Every assistant text block passes through `normalizeAiMarkdown()` before rendering. Its fence-prefix replacement changes a valid `shell` info string into `sh`, moving `ell` into the code body. `jsonc` and `json5` likewise gain `c` and `5` as their first code lines. The same transformation affects live and replayed answers. Input: ````text ```shell printf ok ``` ```` The rendered code is `ell\nprintf ok\n` with class `language-sh`, rather than `printf ok\n` with class `language-shell`. This changes the code an operator sees and copies. ### Expected Behavior and Proposed Boundary Preserve the entire fence info string and code body. Keep the existing fence tracking and repairs for prose outside code. The current heuristic tries to split `bashprintf ok` into `bash` and a command. However, CommonMark permits arbitrary info strings: the spelling alone cannot distinguish a language name from a missing newline. A finite language allowlist would leave the same bug for the next extension. I propose removing this ambiguous repair and leaving such info strings untouched. This deliberately stops guessing a missing newline; it does not change stored text, introduce a parser dependency or change the separate heading/list rules. Reference: https://spec.commonmark.org/0.31.2/#fenced-code-blocks ### Verification and Related Work ECS research on the baseline produced nine failing cases for valid extended labels and actual ReactMarkdown output, with seven ordinary-language controls passing. A bounded allowlist experiment proved the cause but is not the proposed implementation. Merged #6449 protects code bodies but retains this opener transformation. Open #5730 repairs headings/thematic breaks and also retains it. Closed #5330 contains the same transformation. The earlier #5093 / #5089 / #5330 history is relevant context; this report addresses info-string corruption left in the current code, rather than resubmitting their broader work. AI assistance was used for investigation and verification. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
