Stop Marked from converting characters to HTML
Is there a way to stop Marked from converting < > " ' etc. to HTML? I use Markdown in conjunction with my CMS, which uses a number of HTML like tags to output images and links to files that are stored within the CMS. A typical document would look something like this:
# Hello World
## Do you know where your towel
is?
<txp:image id="24" />
Nulla vitae elit libero, a **pharetra** augue. Praesent
commodo cursus magna, vel scelerisque nisl consectetur
et.
<txp:file_download id="10" />
Unfortunately my txp: tags get converted to the following (which my CMS does not understand) when I copy the HTML to the clipboard
<txp:image id=“24” /> <txp:file_download id=“10” />
Failing that is there a way to stop Marked converting them when it encounters the txp: prefix?
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 Ross on 02 May, 2012 09:26 AM
Sorry that should be:
<txp:image id=“24” />'
<txp:file_download id=“10” />`I forgot to wrap them as a code block.
2 Posted by Ross on 02 May, 2012 09:29 AM
Sorry that should be:
<txp:image id=“24” />
<txp:file_download id=“10” />
I forgot to wrap them as a code block.
Support Staff 3 Posted by Brett on 02 May, 2012 01:25 PM
Marked's processor only recognizes block level html elements. To do it with the current version would require you add additional markup that I don't think would be appropriate. I'll consider adding txp tags to the processors do-not-convert list, but it's an edge case and most people _want_ unrecognized tags to be escaped. I'll keep you posted.
4 Posted by Ross on 02 May, 2012 02:15 PM
Thank you very much.