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

adjust regex for rss to include single or double quotes #2935

Conversation

alex-fusionauth
Copy link
Contributor

@alex-fusionauth alex-fusionauth commented Mar 7, 2024

Adjusted regex to pick up single or double quotes in the ReleaseNoteHeading

https://inversoft.slack.com/archives/C02H35R1Q6N/p1709842867204509

image

@lyleschemmerling
Copy link
Contributor

This is what happens when you use regex! We may want to do something more dynamic in future, but shipit for now

@lyleschemmerling lyleschemmerling self-requested a review March 7, 2024 23:16
@@ -6,7 +6,7 @@ export const getReleaseNoteRssItems = async () => {
const releaseLines = releaseNotes.body.split("\n");
const archiveLines = archive.body.split("\n");
const lines = [...releaseLines, ...archiveLines];
const items = lines.map(line => line.match(/ReleaseNoteHeading version="([^"]*)" releaseDate="([^"]*)"/))
const items = lines.map(line => line.match(/ReleaseNoteHeading version=['"]([^('|")]*)['"] releaseDate=['"]([^('|")]*)['"]/))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const items = lines.map(line => line.match(/ReleaseNoteHeading version=['"]([^('|")]*)['"] releaseDate=['"]([^('|")]*)['"]/))
const items = lines.map(line => line.match(/ReleaseNoteHeading version=['"]([^'"]*)['"] releaseDate=['"]([^'"]*)['"]/))

I think this is what you really want. Otherwise, you're saying not to match any of the chars ('|")

@alex-fusionauth alex-fusionauth merged commit 6cb2214 into master Mar 7, 2024
2 checks passed
@alex-fusionauth alex-fusionauth deleted the 2934-rss-for-docsreleasesxml-missing-when-not-using-double-quotes-in-heading branch March 7, 2024 23:35
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.

RSS for /docs/releases.xml missing when not using double quotes in heading
3 participants