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

URL-Encoding for anchor link inside toc #113

Merged
merged 11 commits into from
May 5, 2020
Merged

Conversation

toshimaru
Copy link
Owner

@toshimaru toshimaru commented May 4, 2020

closes #95, closes #101

Description

BEFORE

href inside toc:

<li class="toc-entry toc-h1"><a href="#あ"></a>

href inside the anchor:

<a class="anchor" href="#%E3%81%82" aria-hidden="true"> ...あ
AFTER

href inside toc:

<li class="toc-entry toc-h1"><a href="#%E3%81%82"></a>

href inside the anchor:

<a class="anchor" href="#%E3%81%82" aria-hidden="true"> ...あ

Changes

  • CGI.escape for URL-encoding
  • Refactoring: Create Helper module
  • Refactoring: Do not use Nokogiri::HTML(parser.toc), use parser.build_toc instead

@toshimaru toshimaru self-assigned this May 4, 2020
@toshimaru toshimaru marked this pull request as ready for review May 5, 2020 15:55
@toshimaru toshimaru changed the title Url-Encoding for element id (spaces and UTF-8 support) Url-Encoding for element id May 5, 2020
@toshimaru toshimaru changed the title Url-Encoding for element id URL-Encoding for anchor link inside toc May 5, 2020
@toshimaru toshimaru merged commit af89f4f into master May 5, 2020
@toshimaru toshimaru deleted the url-encode-for-toc-ID branch May 5, 2020 17:52
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.

Missing URL-Encoding of ids or anchor elements
2 participants