vmml

Crates.iovmml
lib.rsvmml
version1.0.1
sourcesrc
created_at2022-12-28 00:44:33.955525
updated_at2022-12-28 20:38:05.46528
descriptionVery Minimal Markup Language
homepagehttps://docs.rs/vmml/latest/vmml/
repositoryhttps://github.com/phoenixr-codes/vmml
max_upload_size
id746566
size13,227
Jonas (phoenixr-codes)

documentation

README

VMML

Very Minimal Markup Language (VMML) is a lightweight markup language that supports nested elements that each contain an attribute.

The purpose of VMML is giving the developer the ability to define how the attribute syntax is. Other things like escaping and capturing elements is done by the parser for the developer.

An example of a VMML document looks as follows:

The [quick](bold) brown [fox](orange) jumps [over the [lazy](bold) dog](italic).
  • quick is an element with an attribute bold.
  • fox is an elment with an attribute orange.
  • over the lazy dog is an element with an attribute italic.
  • Inside the above element is another element lazy with an attribute bold. It is a child of the element over the lazy dog.

An XML version of this could be the following:

The <bold>quick</bold> brown <orange>fox</orange> jumps <italic>over the <bold>lazy</bold> dog</italic>.

VMML has no built-in support to translate files into other markup languages sich as XML.

The file extension for VMML files is .vmml.

Usage

[dependencies]
vmml = "1.0.0"
extern crate vmml;

fn main() {
    let document = "Hello, [World](bold)!";
    let tree = vmml::parse(&document);
    println!("{:#?}", tree);
}

Links

Commit count: 3

cargo fmt