tinyml
v1.0.6
Published
Tiny Markup Language
Downloads
5
Maintainers
Readme
TinyML
TinyML is a lightwidth markup language to design web pages.
From TinyML
translate
Traduces TinyML-syntax to HTML-syntax.
Parameters
🔹 source: string - The TinyML-syntax source to translate to HTML-syntax. 🔹 options: TranslateOptions /* { preserveComments: boolean = true } */ - The options to use when translate.
Return
✅ The HTML.
❌ Throws error.
Examples
{<!DOCTYPE html>}
html(lang="en") {
head {
title {The page title}
}
body {
[ This is a comment ]
hr;
div(class="container") {
h1 {My first title}
p {
Lorem ipsum dolor sit;br;
amet, consectetur
}
}
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<title>The page title</title>
</head>
<body>
<!-- This is a comment -->
<hr/>
<div class="container">
<h1>My first title</h1>
<p>
Lorem ipsum dolor sit<br>
amet, consectetur
<p>
</div>
</body>
</html>
body {
<h1>This is a title</h1>
}
<body>
<h1>This is a title</h1>
</body>
body {
{<h1>This is a title</h1>}
}
<body>
<h1>This is a title</h1>
</body>
[body {
{<h1>This is a title</h1>}
}]
<!--<body>
<h1>This is a title</h1>
</body>-->
body {
[{<h1>This is a title</h1>}]
}
<body>
<!--{<h1>This is a title</h1>}-->
</body>