html_txt = markdown(md_txt)
html_txt = markdown(md_txt, options)
status = markdown(md_filename, html_filename)
status = markdown(md_filename, html_filename, options)
| 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'. |
| Paramètre | Description |
|---|---|
| status | un booléen : le fichier HTML a été généré ou non. |
markdown convertit du texte Markdown en HTML.
Options :
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')
| Version | Description |
|---|---|
| 1.0.0 | version initiale |
| 1.15.0 | 'secure', 'advanced' modes added |