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

No need to monkey patch #2

Open
biomancer opened this issue Aug 5, 2019 · 0 comments
Open

No need to monkey patch #2

biomancer opened this issue Aug 5, 2019 · 0 comments

Comments

@biomancer
Copy link

Hi! I've noticed that you use monkey patching, but actually Kramdown supports custom converters, so you can do just extend it from Html:

module Kramdown
  module Converter
    class Amp < Html
       # override what you need here
    end
  end
end

And then just use like that:
Kramdown::Document.new(YOUR_TEXT).to_amp

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

No branches or pull requests

1 participant