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

Add HTML support for relative url rewrites #252

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

maekawataiki
Copy link

@maekawataiki maekawataiki commented Jan 19, 2025

Description of Change

  • New Feature:
    • Add raw html (image, source, a) support for rewrite_relative_url.
  • Fix:
    • Support external top level domain

Checklist

  • Feature working
  • Updated unit test

Related Issue

#251

@maekawataiki maekawataiki changed the title feat: add html image support for relative url rewrite feat: add html image and anchor support for relative url rewrite Jan 19, 2025
Copy link
Owner

@mondeja mondeja left a comment

Choose a reason for hiding this comment

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

Additionally, it would be great to reuse the same approach for <source> HTML tags.

@mondeja mondeja linked an issue Jan 20, 2025 that may be closed by this pull request
@mondeja mondeja changed the title feat: add html image and anchor support for relative url rewrite Add HTML img support for relative url rewrites Jan 20, 2025
@maekawataiki maekawataiki changed the title Add HTML img support for relative url rewrites Add HTML support for relative url rewrites Jan 26, 2025
@maekawataiki
Copy link
Author

@mondeja Thank you for the review. I've added support for a and source tags.

@maekawataiki
Copy link
Author

I've noticed currently this library doesn't support external top level domain (i.e. https://example.com) and throws error, so also adding fix and test for it.

@mondeja mondeja added the enhancement New feature or request label Jan 28, 2025
@maekawataiki maekawataiki requested a review from mondeja January 29, 2025 02:22
@maekawataiki
Copy link
Author

maekawataiki commented Jan 29, 2025

Sorry, I haven't pushed the change. Just pushed the change.

src/mkdocs_include_markdown_plugin/process.py Outdated Show resolved Hide resolved
src/mkdocs_include_markdown_plugin/process.py Show resolved Hide resolved
tests/test_unit/test_process.py Show resolved Hide resolved
@mondeja mondeja self-requested a review February 1, 2025 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rewrite relative URLs for raw HTML in Markdown
2 participants