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

内部リンクを相対リンクで生成する機能 (cpprefjp/site_generator#81) #131

Merged
merged 6 commits into from
Jun 11, 2024

Conversation

akinomyoga
Copy link
Member

js/kunai.js Show resolved Hide resolved
できるだけ多くのブラウザで見られるように以下の記事 [1] を参考にした。

- [1] https://yukiyuriweb.com/2016/10/08/using-data-uri-scheme-for-svg-in-background-image-compatible-with-ie/

URL エンコードに関連する変換は以下を行う。

  # 行頭・行末の空白を削除
  /^$/d
  s/^[[:space:]]*//
  s/[[:space:]]*$/ /
  s/> $/>/

  # 文字の置換
  s/"/'/g
  s/</%3C/g
  s/>/%3E/g
  s/#/%23/g

その後に tr -d '\n' で改行を削除した。
@faithandbrave faithandbrave merged commit 29390fd into cpprefjp:master Jun 11, 2024
1 check passed
@akinomyoga akinomyoga deleted the relative_link branch June 11, 2024 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants