Create a mixin module from renderer class #42
+102
−93
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First off, thanks for creating and sharing this awesome gem! On GOV.UK Forms we're using it in a couple of places, it's a big help.
In forms-product-page, we've been using it with the markdown-rails gem, which is nice and lightweight, but it's a little awkward and we had to rewrite a bit more code than we'd like to get it to work, and it's pretty brittle (see alphagov/forms-product-page#940 (comment)).
It would be great if govuk-markdown could be included as a mixin into a class, I think that would make it easier for us to use it with markdown-rails.
I've raised this PR as a moving the existing methods into a module seemed pretty straightfoward, happy to take on whatever feedback or suggestions you have.
Many thanks!