Created
August 28, 2018 07:52
-
-
Save Tyralion/5983bc7cc444f53cb92257eff612ec78 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Global conf | |
# | |
Ant.config do | |
tag :p do ->(args, options, content, tags) { | |
"<p>#{content}</p>" | |
} | |
end | |
end | |
# | |
# Local conf | |
# | |
new_conf = Ant::Config.new do | |
tag :p do ->(args, options, content, tags) { | |
"<local-test>#{content}</local-test>" | |
} | |
end | |
end | |
# 1 | |
puts Ant.to_html(%{[p]my 'string!\'' [i color="#f00"]red text[/i]}, nil, new_conf) | |
# 2 | |
puts Ant.to_html(%{[p]my 'string!\'' [i color="#f00"]red text[/i]}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment