fix: table format when markdown render to html #6568
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
本次修改的文件比较多,原因是排查到 markdown 语法不规范导致表格在渲染到 html 时出现排版错乱,如以下页面:
torch.cuda.current_stream
torch.normal
经过细致排查,罪魁祸首是模板给的就不对,详见 pytorch_api_mapping_format_cn.md , 尽管在编辑器或者 github 上能正常显示表格,但在某些场景下不会被渲染(参见 Markdown Tables Not Rendering Correctly)。因此,table 前一行最好为空行。
关联 issue: #6449