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

Convert relative site URLs in release notes #7529

Merged

Conversation

parlough
Copy link
Member

@parlough parlough commented Apr 5, 2024

We no longer use {{site.url}} in Markdown files on the site to enable easier contributing, so {{site.url}} doesn't work as a replacement target anymore. Instead the site-relative image links are formatted as ![alt text](/tools/...). Same goes for other non-image links.

For DevTools to handle this case, this PR uses a regex to recognize Markdown link format to insert the docs site URL or the current debug URL. I used replaceAllMapped over lookahead/lookbehind assertions due to browser support still being limited.

@parlough parlough requested a review from a team as a code owner April 5, 2024 02:05
@parlough parlough requested review from polina-c and removed request for a team April 5, 2024 02:05
@kenzieschmoll
Copy link
Member

Thanks for the PR! Have you verified that the markdown viewer in DevTools still works as expected? (for both the local debugging case and for loading notes from the flutter website in production)? You can click the release notes button here to trigger opening the viewer:
Screenshot 2024-04-05 at 1 27 52 PM

@parlough
Copy link
Member Author

Sorry about the delay, forgot to return to this. Yes, I've tried these latest changes out with a local debugging instance and the production site.

Copy link
Member

@kenzieschmoll kenzieschmoll left a comment

Choose a reason for hiding this comment

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

one comment, but lgtm

@parlough parlough merged commit a6f9d88 into flutter:master May 21, 2024
23 checks passed
@parlough parlough deleted the fix/convert-relative-site-urls-release-notes branch May 21, 2024 00:30
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.

None yet

2 participants