#3790 Markdown页内转跳带有特殊符号的不能转跳

Closed
created 1 year ago by laich · 2 comments
laich commented 1 year ago
<!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): - Git version: - Operating system: - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [ ] Not relevant - Log gist: ## Description 下面的PR中发现不能页内转跳,比如Torch这样能转跳,但是Torch.nn不能转跳。在线下这个Markdown是可以转跳的 https://openi.pcl.ac.cn/OpenI/MSAdapter/pulls/329 ![image](/attachments/c56cc0f6-7c66-4fd5-adf3-54d665c55115) ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** -->
tanglj added the
bug
label 1 year ago
tanglj added the
enhancement
label 1 year ago
tanglj removed the
bug
label 1 year ago
tanglj added this to the V20230410 milestone 1 year ago
ychao_1983 was assigned by tanglj 1 year ago
ychao_1983 commented 1 year ago
Owner
不能跳转,是因为使用了原始html `<a href="#xxx">XXX</a>` 定义跳转链接, 组件在渲染过程中会将id属性自动重命名,但是不会对href="#xxx" 重命名,导致渲染后id找不到,不能正确跳转,目前依赖的组件最新版还是有这个问题,目前无法解决。 有两种规避方法:(1)采用markdown提供的链接定义方式,`[XXX](#jumpID)` (2)即将在4月份发布的版本将不需要用户自己定义目录跳转,平台会默认提供目录功能(https://openi.pcl.ac.cn/OpenI/aiforge/issues/3941)。
ychao_1983 added the
test
label 1 year ago
wangj was assigned by ychao_1983 1 year ago
ychao_1983 removed the
test
label 1 year ago
ychao_1983 added the
test
label 1 year ago
wangj commented 1 year ago
Owner
目前正式环境 Torch.nn可以转跳。
wangj closed this issue 1 year ago
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.