-
Notifications
You must be signed in to change notification settings - Fork 22
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
Fix footnotes to work within call-to-action boxes. #222
Conversation
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.
This looks great - thanks @baisa 👏
Just a couple of suggestions on the contents of the tests.
footnotes = source.scan(/\[\^(\d+)\]:(.*)/) | ||
@acronyms = source.scan(/(?<=\*)\[(.*)\]:(.*)/) | ||
|
||
if is_legislative_list && footnotes.size.positive? | ||
if (is_legislative_list || is_cta) && footnotes.size.positive? |
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 like how you've reused the existing logic 👍
6196bd3
to
17b72e6
Compare
We need to parse footnotes when they appear in $CTA call-to-action boxes as currently they appear as markdown. Added tests.
17b72e6
to
c3f1213
Compare
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.
The changes look great - nice one! 👏
c3f1213
to
43c1ad4
Compare
Trello card
What
We need to parse footnotes when they appear in $CTA call-to-action boxes. Currently they appear as markdown ([^1]).
Why
In call to action boxes ($CTA), footnotes don't work and are just shown as markdown - [^1] - meaning for some publications where there's a need to use GOV.UK patterns to replicate some styling in a printed publication isn't possible.