marqdo

Mid stdlib — toml, html, base32ok

features/15-toml-html-encoding.mq.md

文档

toml:lib/toml.mq.mdhtml:lib/html.mq.mdenc:lib/encoding.mq.md

Config and safe text without plugins

说明

Parse a TOML subset for tools, escape HTML before assembly, encode with base32.

main

说明
cfg = > toml.parse text="app = \"demo\"\n[server]\nport = 8080\n"
> print text =appaccess(`cfg`, "app")
srv =serveraccess(`cfg`, "server")
> print text =portaccess(`srv`, "port")
safe = > html.escape text="<tag>"
> print text=safe
b = > enc.base32_encode text="ok"
> print text=b
Functions
Variables
  • b text
    N5VQ====
  • cfg map · 2
    appdemo
    serverMap(1)
  • description text
    Config TOML + HTML escape + base32 (Mid2 M8)
  • markup text
    occlusion
  • safe text
    &lt;tag&gt;
  • srv map · 1
    port8080
  • title text
    Mid stdlib — toml, html, base32
可执行知识(辅助)

运行与结果

demo 8080 &lt;tag&gt; N5VQ====
完整源码
---
markup: occlusion
title: Mid stdlib — toml, html, base32
description: Config TOML + HTML escape + base32 (Mid2 M8)
import:
  toml: lib/toml.mq.md
  html: lib/html.mq.md
  enc: lib/encoding.mq.md
---

# Config and safe text without plugins

Parse a TOML subset for tools, escape HTML before assembly, encode with base32.

# main

**cfg = > toml.parse text="app = \"demo\"\n[server]\nport = 8080\n"**
> print text=[app](access(`cfg`, "app"))
**srv = [server](access(`cfg`, "server"))**
> print text=[port](access(`srv`, "port"))

**safe = > html.escape text="<tag>"**
> print text=`safe`

**b = > enc.base32_encode text="ok"**
> print text=`b`

Variable