markdown
Converts markdown to html.
📝Syntax
html_txt = markdown(md_txt)
html_txt = markdown(md_txt, options)
status = markdown(md_filename, html_filename)
status = markdown(md_filename, html_filename, options)
📥Input Arguments
Parameter Description
md_txt a string: markdown text to convert.
md_filename a string: markdown filename to convert (source).
html_filename a string: html filename (destination).
options a string: options for the conversion. 'secure' (default), or 'advanced'.
📤Output Arguments
Parameter Description
status a logical: html file generated or not.
📄Description

markdown converts Markdown text-to-HTML.

options:

💡Examples
txt = {'## Example of Markdown text';
'>Nelson supports markdown ...'};
html = markdown(txt);
filewrite([tempdir(), 'markdown_example.html'], html)

if ispc()
  winopen([tempdir(), 'markdown_example.html']);
end
txt = 'Hello <script>alert("XSS")</script> World';
advanced_html = markdown(txt, 'advanced')
secure_html = markdown(txt, 'secure')
🔗See Also
htmltopdf
🕔Version History
Version Description
1.0.0 initial version
1.15.0 'secure', 'advanced' modes added
Edit this page on GitHub