WaveRider

WaveRider

Xlog title anchor link handling is incomplete

  • The original text refers to the source code, such as ## Title.
  • The displayed article is what you see.

If there are no characters between the "numbers, letters, symbols" of the original title and the "Chinese characters," xlog will automatically add a space in the displayed article and replace the space with - in the anchor link of the displayed article; however, although the description link in the right-side directory adds a space, it will not automatically replace it with -, which causes the link to be unusable and unable to jump. Example: the next subtitle.

After discovering the quotes, I also can't figure out Xlog's logic.
The anchor link is not controlled by HTML but by the underlying JS script.
The blogger's solution: just see how it goes!
It is suggested that Xlog modify the JS script, and it would be perfect.

Thanks @sino

Practical Test#

  1. - will also be treated as a symbol, and an additional - will be added between - and other text.
  2. Spaces in the original text will be directly replaced with -.
  3. and will be directly ignored. Clicking on the title below in the right-side directory will surprisingly jump directly to the last title.
Title Source CodeDisplayed ArticleDisplayed Article Anchor LinkRight-side Directory
Hello2Hello 2Hello-2Cannot jump normally
Hello 2Hello 2Hello-2Jumps normally
Hello-WorldHello - WorldHello---WorldJumps normally
Hello WorldHello WorldHello-WorldJumps to Hello“World”1 source code title, but not flush left
Hello“World”1Hello “World” 1Hello-World-1Cannot jump normally

Template#

### Template

Hello-World#

Hello-World

Hello World#

### Hello World

Hello“World”1#

### Hello“World”1
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.