diff options
author | Qrius <[email protected]> | 2025-05-06 11:12:47 +0200 |
---|---|---|
committer | Qrius <[email protected]> | 2025-05-06 11:12:50 +0200 |
commit | e3642c513084a202ee2195dab902d77a0e9575cc (patch) | |
tree | 68f0ee015533bd8408ac6dad511dd5ad0cfb3656 /smp.1 | |
parent | b8dc70cf90a7d9cf44075ffdb63c5721e5077061 (diff) | |
download | skaldpress-e3642c513084a202ee2195dab902d77a0e9575cc.tar.gz skaldpress-e3642c513084a202ee2195dab902d77a0e9575cc.zip |
Add info on code blocks and strings
Diffstat (limited to 'smp.1')
-rw-r--r-- | smp.1 | 35 |
1 files changed, 35 insertions, 0 deletions
@@ -94,6 +94,41 @@ Passes the rest of the file as content to the \fBtemplate\fR-macro. .IP "\fB@html_from_markdown\fR" Passes the rest of the file as content to the \fBhtml_from_markdown\fR-macro. +.SS "\fBStrings\fR" +This macro processor is generally recursive, meaning all macros will process it's arguments normally before using them. +To make this easier to deal with, strings are differentiated between opening and closing. + +Opening is \fB%"\fR, closing is \fB"%\fR. + +.SS "\fBCode\fR" +You can run arbitrary (python) code in the files, which operates in the same environment as the macros. +This means you can from the python code call all builtin macros directly (you will need to manually provide the macro_processor reference). +It also means all definitions you make, are available outside as macro tokens. +Code blocks are opened with \fB%(\fR and closed with \fB)%\fR. + + + +.PP +.nf +.RS +%( +def A(): + return "test" +)% +A +%"A"% +.RE +.fi +.PP +Returns +.PP +.nf +.RS +test +A +.RE +.fi +.PP .SS "\fBBuiltin macro options\fR" There are some macros flags that can enable/disable features, |