Customising generated html tags
Hey,
I was wondering if it would be possible to add an option to customise the html tags that get generated by Marked. I was working with confluence at the moment and it uses the following tags to wrap code blockages:
true/ac:parameter xml/ac:parameter true/ac:parameter
ac:plain-text-body<![CDATA[This is my code]]>/ac:plain-text-body /ac:structured-macro
Marked currently generates:
This is my code
The content between he tags should not be html encoded as it is wrapped in a CDATA block.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Roger Ragulan R... on 14 Mar, 2014 08:21 PM
Here is the confluence snippet again, it looks messed up above.
Support Staff 2 Posted by Brett on 14 Mar, 2014 08:38 PM
It's entirely possible to use a custom processor that produces the code
you're looking for, but I have no knowledge of Confluence or any related
processing. What you see by default is MultiMarkdown output, and it's
not configurable. It would be up to you to find a command-line processor
to plug in.
-Brett
3 Posted by Roger Ragulan R... on 14 Mar, 2014 09:26 PM
Here is an example of what I am trying to achieve, lets say I have the following code block:
it produces this output:
What I would like to do is produce this instead:
Is a custom processor the best way to go for that?
Support Staff 4 Posted by Brett on 14 Mar, 2014 11:25 PM
It's the only way to go. How does this markup usually get generated? Do
you know of anything that creates it from Markdown?
5 Posted by Roger Ragulan R... on 14 Mar, 2014 11:41 PM
I think confluence uses a java markdown parser, I'll come back to you on which one specifically.
The way I am using it is, I general the html documents outside of confluence and then add the html to confluence via a web UI. So that's why I wanted to know if Marked could be adapted to do the above.