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

Ensure data-module is a valid attribute for buttons, Don't match button for inline or indentations #116

Merged
merged 2 commits into from
Nov 21, 2017

Conversation

NickColley
Copy link
Contributor

@NickColley NickColley commented Nov 20, 2017

I made a mistake by not including proper test coverage of the validation of this new feature.

This fixes the mistake and adds the correct tests that should have caught this earlier.

This also makes sure that buttons are only matched when not indented, which will make it easy to include this govspeak in guides.

https://trello.com/c/ppqXaGPk/122-create-a-govspeak-component-for-buttons

I made a mistake by not including proper test coverage of the validation of this new feature.

This fixes the mistake and adds the correct tests that should have caught this earlier.
In order to display this govspeak in our guide we want to be able to indent it,
but due to how this regex works, this is not possible.

Now buttons will only be matched when they're not indented or inline within text.
@NickColley NickColley changed the title Ensure data-module is a valid attribute for buttons Ensure data-module is a valid attribute for buttons, Don't match button for inline or indentations Nov 21, 2017
Copy link
Contributor

@emmabeynon emmabeynon left a comment

Choose a reason for hiding this comment

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

LGTM 🌴

@NickColley NickColley merged commit 4c252e4 into master Nov 21, 2017
@NickColley NickColley deleted the fix-button-govspeak-validation branch November 21, 2017 14:00
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