-
Notifications
You must be signed in to change notification settings - Fork 17
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
Internal hrefs should be resolved after componentization #3
Comments
I'm actually needing this. Are there any updates? Otherwise I could try to come up with a patch |
I don't think I've done any work on this, so a patch would be much appreciated. |
What do you think about this? https://github.com/frank06/peregrin/commit/24e957bee27d6c47dda15c1af89af724870b78b8 (There might be an easier way than re-parsing the parts to find IDs, not sure) |
Looks pretty good to me. Couple things:
|
Check my latest commits.
|
If a single file is split up into many HTML files by the componentizer, any internal URLs (such as "#part6") will no longer work. When saving the components, we should comb through them for "a[href=/^(index.html)?#/]" and find the component to which the href is referring, prepending this to the href.
We don't have to worry about this for other hrefs, like img#src or link#href, since the things they point to will already work. Unless we're worried about JavaScript (and I'm not), a#href is the only attribute I think we need to update.
The text was updated successfully, but these errors were encountered: