Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

防止中文标点符号出现在类似加粗的 markdown 标记的内侧 #14

Open
Jinjiang opened this issue Aug 30, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@Jinjiang
Copy link
Collaborator

Jinjiang commented Aug 30, 2020

摘自 Vue 中文翻译 wiki

  1. 在加粗段落,仅当影响 markdown 渲染情况下,将最后一个句号或逗号、冒号,迁移到 ** 右侧,否则保持原样。(讨论:vuejs/docs-next-zh-cn#49vuejs/docs-next-zh-cn#78
// 情况1:
 **相对胜于晦涩。**例如,一个 `<BlogPost>` 组件例子比 `<CurrencyExchangeSettings>` 更好。 // vuepress 无法渲染
(调整为:)
**相对胜于晦涩**。例如,一个 `<BlogPost>` 组件例子比 `<CurrencyExchangeSettings>` 更好。  // 迁移句号有加粗符号右侧

// 情况2:不影响渲染,保持原样
**你好,世界。** ==> **你好,世界。** (不影响渲染,保持原样)

该判断逻辑技术上的难点是需要在 markdown parser 处理之前进行分析和修正。目前 zhlint 暂不支持,且并没有深入到 markdown parser 的定制当中。

如果要做的话,处理逻辑和 zhlint 的其它功能之间应该也是相对独立的。
解决方案待讨论

更多示例记录:

  • 异步组件默认就是 **“suspensible”** 的
@Jinjiang Jinjiang added the enhancement New feature or request label Sep 21, 2020
@Jinjiang Jinjiang added this to the Next release milestone Oct 4, 2020
@Jinjiang Jinjiang changed the title Feature: avoid punctuation beside a strong mark internally 防止中文标点符号出现在类似加粗的 markdown 标记的内侧 Jan 30, 2022
@Jinjiang Jinjiang removed this from the Next release milestone May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant