Reopen #5433
- Dominant language
- TypeScript
- Stars
- 41.8k
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
### Check List
- [x] I have already read [Docs page](https://hexo.io/docs/).
- [x] I have already searched existing issues.
### Feature Request
~建议回滚PR #5616 #5717 #5722~
我最近将这个站点https://github.com/volantis-x/community/blob/main/package.json#L21 的hexo升级到最新的8.1.2版本,发现存在问题 https://github.com/volantis-x/hexo-theme-volantis/issues/330#issuecomment-5042784095 包含注释语法的标签与其他的标签以及代码块进行复杂嵌套时,无法正常渲染。我将hexo版本降为v7时,正常渲染,已经确认是hexo的问题。后来我发现v8.1.2在文档将某个嵌套的标签直接改写成html倒是也能正常渲染。
我梳理了完整的时间线:
首先是由于issues #5433 中 html注释中的代码块被转换问题,引入了PR #5616 进行修复,之后发现修复补丁引入了新的问题 #5716 #5715 ,对新引入的问题继续打补丁 #5717 ,但是发现仍然存在问题 #5721 ,于是继续打补丁 #5722
但是依旧存在潜在的问题,就如我正遇到的这个。但是标签嵌套的结构的复杂性已经远超人们的想象,我认为这已经是一个不容易解决的问题。
~事情的起因是为了解决注释中的代码块的异常,这本身就是用户在页面中无法直接看到不显示的注释内容。起初这种异常渲染是用户不容易感知的。~
~但是修复的补丁却不断引入新的用户可见的异常,这些异常导致页面无法正常渲染,这些异常是用户可见的。~
~而且如你所见,维护成本和复杂性都在显著提高的情况下依然存在潜在的不容易解决的问题。~
~所以我建议回滚这些操作 #5616 #5717 #5722 。~
~至于之前的注释中的代码块的异常问题,我认为对于访客来说注释本身就不可见,不会有人会关心别人站里的注释里写了什么东西。更不会发现注释里有什么异常。~
### Others
史前史中,没有别的场景比巨兽在焦油坑中垂死挣扎的场面更令人震撼。上帝见证着恐龙、猛犸象、剑齿虎在焦油中挣扎。它们挣扎得越是猛烈,焦油纠缠得越紧,没有任何猛兽足够强壮或具有足够的技巧,能够挣脱束缚,它们最后都沉到了坑底。
—— 人月神话·焦油坑
Contributor guide
Research direction
Start by reproducing the nested comment, tag, and code-block case described in the Volantis issue with Hexo 8.1.2, then compare it with v7 and inspect PRs #5616, #5717, and #5722. The issue identifies no Hexo source file or test and proposes rollback rather than a settled fix; done would require an agreed scope and a verified rendering regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, typescript
- Domain
- tooling, web-dev
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100