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

Refactor URL rewriting #250

Merged
merged 5 commits into from
Nov 28, 2014
Merged

Refactor URL rewriting #250

merged 5 commits into from
Nov 28, 2014

Conversation

d0ugal
Copy link
Member

@d0ugal d0ugal commented Nov 27, 2014

Use a Markdown extension to hook into the build process and modify the
HTML document tree rather than using regular expressions to process
the HTML.

Fixes #240

Use a Markdown extension to hook into the build process and modify the
HTML document tree rather than using regular expressions to process
the HTML.

Fixes mkdocs#240
@tomchristie
Copy link
Member

Oh my! :)

@d0ugal
Copy link
Member Author

d0ugal commented Nov 27, 2014

I didn't know where to put the extenstion, not sure about mkdocs.mdextensions but it was the best I could think of.

@tomchristie
Copy link
Member

Probably marginally better to just keep the structure flat. relative_path_ext.py or relative_path_extension.py would be fine.

@@ -0,0 +1,83 @@
from markdown.treeprocessors import Treeprocessor
Copy link
Member

Choose a reason for hiding this comment

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

Docstring with what and why maybe?

Eg. example of before and after link.

@d0ugal
Copy link
Member Author

d0ugal commented Nov 27, 2014

cool, I'll do that

@d0ugal
Copy link
Member Author

d0ugal commented Nov 28, 2014

Ready for a re-review if you get time @tomchristie

@tomchristie
Copy link
Member

👍

d0ugal added a commit that referenced this pull request Nov 28, 2014
@d0ugal d0ugal merged commit f0270ce into mkdocs:master Nov 28, 2014
@d0ugal d0ugal deleted the script branch November 28, 2014 10:20
@d0ugal d0ugal added this to the 0.12.0 milestone Dec 4, 2014
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.

URL are changed in <script src> from code blocks
2 participants