Releases: tinyBigGAMES/Markup
Releases · tinyBigGAMES/Markup
Markup v0.1.0
Markup — Document Authoring Language
Write documents, not HTML. Every construct follows the same {tag "content"} pattern — variables, conditionals, iteration, and component definitions all use the same syntax. A Markup document compiles to clean, semantic HTML.
Highlights
- Single-syntax design — everything is
{tag "content"}, no mode switches, no special cases, no ambiguous parsing contexts - Quoted string delimiters — content is delimited by
"...", so the parser knows exactly what to preserve - Turing-complete logic — variables, conditionals, iteration, recursion, and reusable components are first-class constructs
- Expression evaluator with pipes —
{=expr | filter}interpolation with chainable transforms - Built-in functions — string, math, comparison, collection, HTML, and type operations
- Data binding — pass JSON data and access it from templates with
{=data.path}interpolation - DLL with flat C-style API — ship as a single
Markup.dll, integrate from Delphi, C/C++, or any FFI-capable language - Extensibility — register custom tag handlers and expression functions at runtime
- Configurable options — pretty-print output, strict mode, HTML sanitization, unknown tag handling, and safety limits per engine instance
- Include system — file includes with data attributes and circular reference detection
- File output — render directly to
.htmlfiles with optional browser launch viamarkup_convert_to_file
Testbed demos:
- Formatting — headings, inline text, lists, tables, code blocks, sections, layout, links & media, quotes, callouts, details, forms, void tags
- Logic — variables, conditionals, iteration, components, pipes, eval, raw HTML, meta tags
- Built-in functions — string, math, comparison, collection, HTML, type
- API — convert-to-file, include paths
- Extensibility — custom tags, custom functions, status handler
Each demo produces a standalone HTML file in bin/output/ demonstrating the feature set.
Quick start (Delphi):
uses
Markup;
var
LEngine: TMuEngine;
LHtml: PAnsiChar;
begin
LEngine := markup_create();
try
LHtml := markup_convert(LEngine,
PAnsiChar(UTF8Encode(
'{h1 "Hello, Markup!"}{p "Write Documents, Not HTML."}')),
nil);
try
WriteLn(string(UTF8String(LHtml)));
finally
markup_free(LHtml);
end;
finally
markup_destroy(LEngine);
end;
end;Quick start (C/C++):
#define MARKUP_IMPLEMENTATION
#include "Markup.h"
int main(void) {
if (!markup_load("Markup.dll")) return 1;
MuEngine engine = markup_create();
char* html = markup_convert(engine,
"{h1 \"Hello, Markup!\"}{p \"Write Documents, Not HTML.\"}",
NULL);
printf("%s\n", html);
markup_free(html);
markup_destroy(engine);
markup_unload();
return 0;
}Documentation: See docs/Specs.md for the language specification, docs/API.md for the complete DLL API reference, and docs/User.md for the practical usage guide.
Requirements: Windows 10/11 x64. Building from source requires Delphi 12.x or higher.
File Integrity
Files are signed with minisign using this public key:
RWQqjFkbJ5MpCO03yJuQV8NBQGP5iGhb4nxIbw31Oa0ctj3nWi75Zoll