Skip to content

About

A semantic alternative to Markdown that compiles to HTML. Instead of describing formatting, MML describes meaning through structured tags like claim, evidence, argument, timeline, and event.

Topics

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

114 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Modular Markup Language

MML is a meaning-first markup language that remains readable as plain text. This package parses MML, validates its structure, and compiles valid documents to HTML.

Open the live parser · Project documentation · Language specification

GitHub commit activity

Compile a file in your terminal

Save this as example.mml:

argument
claim
MML is readable as plain text.
evidence
Each opening tag sits on its own line.

Run this from the folder containing the file:

npx @monapdx/mml example.mml

The command prints compiled HTML. Add > example.html to save the output. If the source is invalid, the command prints diagnostics and exits with an error.

For regular use, install the command globally with npm install -g @monapdx/mml, then run mml example.mml.

Use MML from JavaScript

npm install @monapdx/mml

Save this as example.mjs and run node example.mjs.

import { processSource } from "@monapdx/mml";

const source = `argument
claim
Markdown introduces an unnecessary abstraction layer.
evidence
The final rendered output is already HTML.`;

const result = processSource(source);

if (result.valid) {
  console.log(result.html);
} else {
  console.error(result.parseErrors, result.validationErrors);
}

processSource also returns the syntax tree as ast and its JSON representation as astJson. Use the named exports parse, validate, and compile if you need to run the stages separately. The package uses ES modules.

About

A semantic alternative to Markdown that compiles to HTML. Instead of describing formatting, MML describes meaning through structured tags like claim, evidence, argument, timeline, and event.

Topics

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages