Skip to content

手動で目次を作成した時に#以降に特定の文字を指定すると、ページ番号が??になりリンクされない #164

@kght6123

Description

@kght6123

Describe the bug
句読点などを含むHeaderに#を使って、目次からHeaderへのリンクを作るとページ番号が??になり、リンクされなくなります。(サンプルコード

1. [Manuscript2](manuscript2.html)
    1. [吾輩は猫である21(通常)](manuscript2.html#吾輩は猫である21)
    1. [吾輩は、猫である22(句読点あり)](manuscript2.html#吾輩は、猫である22)
 (以下、省略)

https://github.com/kght6123/kght6123-book-template/blob/c40c1f7a615b94c573aec0a8f8aa0b1bdb490457/toc.md?plain=1#L6

<!-- manuscript2.mdの記述 -->
## 吾輩は、猫である22

この書生の掌の{裏|うち}でしばらくはよい
(以下、省略)

https://github.com/kght6123/kght6123-book-template/blob/c40c1f7a615b94c573aec0a8f8aa0b1bdb490457/manuscript2.md?plain=1#L9

To Reproduce
下記のリポジトリをクローンして、npm installしてnpm run devする
https://github.com/kght6123/kght6123-book-template/

Screenshots

スクリーンショット 2023-01-10 22 52 45

他にもわかっているだけで、下記の様なアットマーク、全角かっこ、半角空白、全角プラスで発生します。
(半角かっこでも起きます、全角半角の区別はないのかもしれません。)

    1. [吾輩は猫である23(URLエンコード、空白なし)](manuscript2.html#%E5%90%BE%E8%BC%A9%E3%81%AF%E7%8C%AB%E3%81%A7%E3%81%82%E3%82%8B23)
    1. [@吾輩は猫である24(@あり)](manuscript2.html#@吾輩は猫である24)
    1. [吾輩は(猫)である25(括弧あり)](manuscript2.html#吾輩は(猫)である25)
    1. [吾輩は 猫 である26(URLエンコード、空白あり)](manuscript2.html#%E5%90%BE%E8%BC%A9%E3%81%AF+%E7%8C%AB+%E3%81%A7%E3%81%82%E3%82%8B26)
    1. [吾輩は猫+である27(プラスあり)](manuscript2.html#吾輩は猫+である27)

Desktop:

  • OS: macOS 13.0.1 M1 Pro
  • Browser Chromium(previewで起動するブラウザ)
  • Version 108.0.5359.29(Developer Build)(arm64)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions