Write your MulleScion template code in HTML lookalike tags. Now reformat the HTML document and it doesn't destroy your template code (as much).
Check the Wiki for editor setup help.
| Release Version | Release Notes | AI Documentation |
|---|---|---|
| RELEASENOTES | DeepWiki for MulleScionHTMLPreprocessor |
Preprocessor support is available starting with MulleScion version 1859.
MulleScionParser *parser;
...
[parser setPreprocessor:[MulleScionHTMLPreprocessor object]];
<html> <head> <objc> x = @"Hello World"; </objc> </head> <body> <if x> <h1></h1> <else/> <h1>I have nothing to say</h1> </if> </body> </html>
Unknown tags shouldn't get rendered by the browser. Therefore there is nothing to do for
most tags. The text between <objc> and </objc> can be hidden with CSS:
<style type="text/css"> objc { display: none; white-space: pre; } </style>
Tag pairs enclose template content. The tag-pairs are translated to MulleScion handlebars. There is no syntax check done on the text following the tag identifier.
| Tag Opener | Closer | Translates to |
|---|---|---|
<block> |
</block> |
{% block %} {% endblock %} |
<else/> |
{% else %} |
|
<if expr> |
</if> |
{% if expr %} {% endif %} |
<for var in expr> |
</for> |
{% for var in expr %} {% endfor %} |
<objc> |
<objc> |
{% %} |
<while expr> |
</while> |
{% while expr %} {% endwhile %} |
objc is useful to add Objective-C code in the <head> section of the HTML
document, but it can be placed anywhere.
The other tags are more useful in the <body> section.
<block>is experimental, it might get removed<else/>has no closer.
Use mulle-sde to add MulleScionHTMLPreprocessor to your project:
mulle-sde add github:MulleWeb/MulleScionHTMLPreprocessor
Use mulle-sde to build and install MulleScionHTMLPreprocessor and all dependencies:
mulle-sde install --prefix /usr/local \ https://github.com//MulleScionHTMLPreprocessor/archive/latest.tar.gz
Install the requirements:
| Requirements | Description |
|---|---|
| MulleFoundationBase | 🧱 MulleFoundationBase amalgamates Foundations projects |
| mulle-objc-tools | 📒 Lists mulle-objc runtime information contained in executables. |
Download the latest tar or zip archive and unpack it.
Install MulleScionHTMLPreprocessor into /usr/local with cmake:
PREFIX_DIR="/usr/local" cmake -B build \ -DMULLE_SDK_PATH="${PREFIX_DIR}" \ -DCMAKE_INSTALL_PREFIX="${PREFIX_DIR}" \ -DCMAKE_PREFIX_PATH="${PREFIX_DIR}" \ -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --config Release
All platforms and compilers supported by mulle-c11.
Nat! for Mulle kybernetiK