Not just a text formatter, don't mark it down, etch it.
```
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.
And lastly, tags can be declared when you first reference them[d: .nice] and the tag name is optional[.cool]. ```
```
```
Or other files as preformatted text:
``` [css]
```
```
```
```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); ```
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"); ```
```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);
} ```