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

Replace inline links for template version #25152

Merged
merged 5 commits into from
Dec 21, 2022

Conversation

bergden-resonai
Copy link
Contributor

@bergden-resonai bergden-resonai commented Dec 17, 2022

Description

As I wrote here, there are a ton of explicit html-type links in the docs, which makes page.js less effective in managing all these links
This PR includes:
Replacing:
<a href="([\w\p{L}:/.\-_()?#=!~]+)" target="_blank">([\w\p{L}:/.\-_'\s]+)</a>
For:
[link:$1 $2]

And replacing:
<a href="([\w\p{L}:/.\-_()?#=!~]+)">([\w\p{L}:/.\-_'\s]+)</a>
For:
[link:$1 $2]

As I wrote in the above comment, I'm not sure what to do with the slightly more complicated variants like:

  1. 16 occurences of links with & (example)
    (will require adjusting the regex in code.js)
  2. 169 links with rel= (example)
  3. 9 examples of a link a line break between the and content (same example as (2))
  4. More?? (I searched using <a.*>\s*([\w\p{L}:/.\-_'\s]+)\s*</a> and couldn't find anything else relevant - only internal links using id="")

Testing URL

This contribution is funded by Resonai

@mrdoob mrdoob added this to the r148 milestone Dec 21, 2022
@mrdoob mrdoob merged commit a81731d into mrdoob:dev Dec 21, 2022
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.

2 participants