-
Notifications
You must be signed in to change notification settings - Fork 25
Fix bug in label parsing #232
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
Conversation
✅ Deploy Preview for neo4j-docs-ui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
stefano-ottolenghi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't tested, but code-wise and aparte the linting warnings LGTM.
src/js/60-docs-roles.js
Outdated
|
|
||
| roleDivs.forEach(function (roleDiv) { | ||
| var roles = roleDiv.classList | ||
| // ignore discrete headers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd move the comment to before line 76, where the check happens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Argh - well spotted. I actually meant to combine the if statements before committing
Thanks - I also fixed the linting warnings with the later commit |
Fixes an issue with some labels being wrongly parsed where the text before the first hyphen was used instead of the full label. For example, `aura-db-enterprise` was being treated as `aura` because that is a valid label in rolesData.json. There are essentially two types of labels: - 'version' labels, where we want to use only the text before the hyphen, eg `new-5.20` for the label class and add the text after the hyphen as label text. - all other labels, where we take the whole label text and use that for the label class, and take the label text from rolesData.json This PR also fixes an issue with discrete headings. Labels are no longer displayed on discrete headings.
Fixes an issue with some labels being wrongly parsed where the text before the first hyphen was used instead of the full label. For example, `aura-db-enterprise` was being treated as `aura` because that is a valid label in rolesData.json. There are essentially two types of labels: - 'version' labels, where we want to use only the text before the hyphen, eg `new-5.20` for the label class and add the text after the hyphen as label text. - all other labels, where we take the whole label text and use that for the label class, and take the label text from rolesData.json This PR also fixes an issue with discrete headings. Labels are no longer displayed on discrete headings.
Fixes an issue with some labels being wrongly parsed where the text before the first hyphen was used instead of the full label.
For example,
aura-db-enterprisewas being treated asaurabecause that is a valid label in rolesData.json.There are essentially two types of labels:
new-5.20for the label class and add the text after the hyphen as label text.This PR also fixes an issue with discrete headings.
Labels are no longer displayed on discrete headings.