Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

markdown-it-anchor の slugify が十分使えそうなので @sindresorhus/slugify の代わりにデフォルトのものを使うようにする #7860

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

cafedomancer
Copy link
Contributor

@cafedomancer cafedomancer commented Jun 16, 2024

Issue

概要

Markdown 中のアンカーリンクが重複する問題を部分的に解決します。具体的には、アンカーリンクの slug 化に使っているライブラリを別のものに置き換えます。詳細は #4607 (comment)

変更確認方法

  1. use-default-slugify-instead-of-sindresorhus-slugify をローカルに取り込む
  2. 適当なユーザーでログイン
  3. 適当なプラクティスのページを開く
  4. 見出しのアンカーリンクが見出しの内容を URL エスケープしたものになっていることを確認

Screenshot

変更前

(h2 の id 属性が空だったり -1 だったり、a の href 属性も # だったり #-1 だったり)
Screenshot 2024-06-17 at 9 29 37

変更後

(h2 の id 属性が見出しのテキストを URL エスケープしたもの、a の href 属性も同様)
Screenshot 2024-06-17 at 9 30 30

@cafedomancer cafedomancer self-assigned this Jun 16, 2024
Copy link
Member

@komagata komagata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます!!

@komagata komagata merged commit 24075f5 into main Jun 17, 2024
6 checks passed
@komagata komagata deleted the use-default-slugify-instead-of-sindresorhus-slugify branch June 17, 2024 08:01
@github-actions github-actions bot mentioned this pull request Jun 17, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants