Files
DeepTutor/web/components/common
p421098 cfbd49bad0 fix(web): repair malformed strong-emphasis spacing in assistant output (#786)
* fix(web): repair malformed strong-emphasis spacing in assistant output

* style(web): keep removeEmptyMarkdownTables' loop header as dev has it

The branch reformatted an untouched line ('; )' -> ';)'). The repo's real
style is not what .prettierrc reports, so a stray prettier pass here would
land as unrelated churn in the squashed commit.

* fix(web): make the strong-emphasis repair fail-safe

The rewrite paired an opening ``**`` with the next one on the line
regardless of whether the line's markers pair off at all, so it corrupted
Markdown the renderer already handles correctly (checked against the
repo's own micromark):

- ``In Markdown, use ** to make text **bold**.`` lost its bold — the
  capture was allowed to start at whitespace, so a literal ``**`` in
  prose swallowed the sentence up to the next opener.
- ``**Note: **Important**`` became ``**Note:** Important**``, dropping
  the bold and leaking a stray ``**``.
- ``**重點 **必讀** 內容**`` — valid nested emphasis — lost most of its
  bold.

Anchor the capture at a non-space, require it to end at a colon (the
reported shape), and skip any line whose ``**`` count is odd: with an odd
count at least one marker is literal or unclosed, and there is no way to
tell which two were meant to pair. Bailing out is free — the line then
renders exactly as it does without this repair. Also skip indented code
blocks, which are shown verbatim and are not masked with the fenced ones.

---------

Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
2026-08-12 17:06:47 +08:00
..
2026-08-02 13:23:45 +08:00
2026-06-11 20:03:34 +08:00
2026-06-17 10:50:44 +08:00
2026-07-31 00:25:48 +08:00
2026-06-17 10:50:44 +08:00
2026-04-23 19:29:16 +08:00
2026-06-11 20:03:34 +08:00
2026-06-11 20:03:34 +08:00