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

Display link text correctly #203

Merged
merged 3 commits into from
Jun 26, 2020
Merged

Conversation

ButterflyBug
Copy link
Contributor

@ButterflyBug ButterflyBug commented May 24, 2020

In generated documentation, the link text placed into [] is not followed
by left angle bracket and it redirects to the given website.

Closes #201

pdoc/html_helpers.py Outdated Show resolved Hide resolved
pdoc/html_helpers.py Outdated Show resolved Hide resolved
pdoc/test/__init__.py Outdated Show resolved Hide resolved
@ButterflyBug
Copy link
Contributor Author

Hi, I've just updated my PR 😃 Let me know if you make up some another suspicious type of URLs 😄

pdoc/html_helpers.py Outdated Show resolved Hide resolved
pdoc/html_helpers.py Outdated Show resolved Hide resolved
@ButterflyBug ButterflyBug force-pushed the link_text_issue_201 branch 2 times, most recently from 466aba8 to 6be0409 Compare June 16, 2020 19:36
Copy link
Member

@kernc kernc left a comment

Choose a reason for hiding this comment

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

Almost there! If we're doing it, let's do it proper. Thank you!

pdoc/html_helpers.py Outdated Show resolved Hide resolved
pdoc/html_helpers.py Outdated Show resolved Hide resolved
pdoc/test/__init__.py Show resolved Hide resolved
In generated documentation the link text placed into [] is not followed
by left angle brakcet and it redirects to the given website. Moreover,
improved regular expression enables displaying url given in parentheses
or url containing them, i.e.:

(https://example.com)
https://example.com/more_(examples)
@kernc
Copy link
Member

kernc commented Jun 26, 2020

I pushed some pedantic touch-ups I didn't feel like voicing aloud. This now looks good and should hopefully stick as far as wrapping raw URLs goes. 🤞 Much appreciated!

If you care to make other regexes in the module more reader-friendly, or if you find other bugs, obviously welcome. 😁 Thanks!

@kernc kernc merged commit 1de51a9 into pdoc3:master Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Link text displayed incorrectly
2 participants