markdown
Convertit le Markdown en HTML.
📝Syntaxe
html_txt = markdown(md_txt)
html_txt = markdown(md_txt, options)
status = markdown(md_filename, html_filename)
status = markdown(md_filename, html_filename, options)
📥Arguments d'entrée
Paramètre Description
md_txt une chaîne : texte markdown à convertir.
md_filename une chaîne : nom du fichier markdown à convertir (source).
html_filename une chaîne : nom du fichier html (destination).
options une chaîne : options pour la conversion. 'secure' (par défaut) ou 'advanced'.
📤Arguments de sortie
Paramètre Description
status un booléen : le fichier HTML a été généré ou non.
📄Description

markdown convertit du texte Markdown en HTML.

Options :

💡Exemples
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')
🔗Voir aussi
htmltopdf
🕔Historique des versions
Version Description
1.0.0 version initiale
1.15.0 'secure', 'advanced' modes added
Modifier cette page sur GitHub