Etch v0.4

Not just a text formatter, don't mark it down, etch it.

Syntax

Not too dissimilar from Markdown, simpler yet also more powerful:

```

My Document

This is what etch text looks like!

[a] You can tag entire blocks of text with a tag prefix, individual words[b] with a tag suffix, or [entire spans of text][b] using square brackets.

[a: .myClass]

[b: @alt surprise alt text!]

[c: @https://example.com]

And lastly, tags can be declared when you first reference them[d: .nice] and the tag name is optional[.cool]. ```

Documents can import other documents:

```

import[my-document.etch]

```

Or other files as preformatted text:

``` [css]

import[my-css-example.css]

```

Documents can contain custom metadata such as a title or description:

```

meta[title: My Document]

```

Plugin API allows for transforming documents or injecting custom parsers.

```rs use etch::Etch; use etch::plugins::*;

let wordcount = WordCountPlugin::new(); let etch = Etch::default() .withplugin(wordcount.clone()) .withdocument("my_document.etch");

println!("{:#?}", word_count); ```

Code syntax highlighting provided by the Syntect plugin.

Enable the syntect-plugin feature:

toml [dependencies] etch = { version = "...", features = ["syntect-plugin"] }

And attach the plugin:

```rs use etch::Etch; use etch::plugins::*;

let etch = Etch::default() .withplugin(SyntectPlugin::new()) .withdocument("my_document.etch"); ```

Usage

```rs use etch::Etch; use etch::plugins::*;

fn main() { let metadata = MetadataPlugin::new(); let wordcount = WordCountPlugin::new(); let etch = Etch::default() .withplugin(metadata.clone()) .withplugin(wordcount.clone()) .withplugin(SyntectPlugin::new()) .withplugin(WidowedWordsPlugin::new()) .withdocument("mydocument.etch");

println!("{:#?}", etch.render());
println!("{:#?}", metadata);
println!("{:#?}", word_count);

} ```