Skip to content

Conversation

@lfdebrux
Copy link

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!

Move the method definitions in the Renderer class into a mixin that can
be included into a subclass of `Redcardpet::Render::HTML`.

This is useful when trying to customise an existing extension to
Redcarpet, for instance markdown-rails.
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.

1 participant