#@markdown(text, html?: bool) → map
Rend du Markdown : $doc.html, $doc.title, $doc.meta (front matter) et $doc.text. Le HTML brut du texte est affiché comme du texte, et les liens javascript: ne mènent nulle part, si bien qu'un commentaire de visiteur ne peut pas ajouter de script ; html conserve le HTML brut, pour le texte que vous avez écrit vous-même.
| Paramètre | Prend |
|---|---|
text requis | n'importe quelle valeur |
html facultatif | un indicateur : html ou not html |
Les arguments peuvent être nommés : @markdown(…, html: …).
Exemple
<import package="KScript.Markdown" />
<let name="post" value="@markdown('# Hello *world*')" />
<echo>{ $post.title }: { $post.html }</echo>import KScript.Markdown
$post = @markdown('# Hello *world*')
echo "{ $post.title }: { $post.html }"