Closed asiniy closed 9 years ago
Hello @asiniy,
This is not a feature that ships with Redcarpet by default but you can implement a custom render object to handle this as described in the README file. Just a couple things however:
You will have to enable the :underline
, :superscript
and :strikethrough
options to be able to translate these entities from Markdown to BBCode. For example:
parser = Redcarpet::Markdown.new(BBCodeRender, underline: true, superscript: true, strikethrough: true)
I'm giving it a close ; thanks ! :-)
@robin850 may I push the tool to convert the source of redcarpet?
may I push the tool to convert the source of redcarpet?
Sorry but I'm not sure to understand what you're asking here. Do you mean to add such render to Redcarpet along the ManPage
one for instance ?
@robin850 It seems so
@asiniy : Well I'm not sure that this will be a good fit unfortunately. BBCode has some features that Markdown doesn't have (e.g. an equivalent to the [color]
tag). In case of the built-in render objects like ManPage
this is not a problem because Markdown features overpass the features that troff (the markup used to write man pages) provides.
At least since you've spotted this in this issue, people can easily find the bootstrap render object and customize it for their needs. :-)
@robin850 thanks for hint. You're right! Happy new year!
Happy new year to you too, thanks! :-)
Hello!
Is there any way to convert markdown to bb code with redcarpet? Or, maybe convert markdown to html and then to bb code? I can't find any helpful gem or method. Please help if you can.