I have an md file that I'm trying to post to Confluence using the Markup macro. It contains several code blocks. When pasting the contents into the input field in Markup dialog, those blocks turn into plain mono preformatted paragraphs. I tried to change the ``` that start code blocks into inline HTML, e.g. <ac:structured-macro ac:name="code" ac:schema-version="1"> etc., but Markup fails to parse it as inline HTML and just inserts in the text literally. I don't regard changing every such piece of the doc into a Code Block macro as a plausible option (and even less do I regard doing it again, when the source md file changes) but is there a way to automate it? Thanks.
Ok, after some automated text processing and slightly-less-automated brace and sqr. bracket escaping I was able to convert the initial md into Conflu wiki format where macros can be typed, perhaps will keep it as such.
@Denis Trapeznikov Welcome to the community!
You can use the following syntax for the markup macro:
{code:title=This is my title|theme=FadeToGrey|linenumbers=true|language=java|firstline=0001|collapse=true}
This is my code
{code}
Hope it helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, this is something called "Confluence markup syntax", and Conflu seems to ignore it when pasted into the Markdown input.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.