| Crates.io | oak-notedown |
| lib.rs | oak-notedown |
| version | 0.0.1 |
| created_at | 2025-10-22 04:31:56.202668+00 |
| updated_at | 2026-01-23 04:42:35.719749+00 |
| description | High-performance incremental Markdown parser for the oak ecosystem with flexible configuration, optimized for documentation and content creation. |
| homepage | https://github.com/ygg-lang/oaks |
| repository | https://github.com/ygg-lang/oaks |
| max_upload_size | |
| id | 1894941 |
| size | 104,990 |
High-performance incremental Notedown parser for the oak ecosystem with flexible configuration, optimized for document processing and rendering.
Oak Notedown is a robust parser for Notedown, designed to handle complete Notedown syntax including modern features. Built on the solid foundation of oak-core, it provides both high-level convenience and detailed AST generation for document processing and rendering.
Basic example:
use oak_notedown::{NotedownLexer, NotedownLanguage};
use oak_core::{Lexer, Source};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let language = NotedownLanguage::default();
let lexer = NotedownLexer::new(&language);
let source = Source::new(r#"
# Hello, Notedown!
This is a **paragraph** with *emphasis*.
## Features
- Lists
- Code blocks
- And more!
"#);
let result = lexer.tokenize(&source);
println!("Parsed Notedown successfully.");
Ok(())
}
use oak_notedown::{NotedownLexer, NotedownLanguage};
use oak_core::{Lexer, Source};
let language = NotedownLanguage::default();
let lexer = NotedownLexer::new(&language);
let source = Source::new(r#"
# My Document
This is a simple document.
"#);
let result = lexer.tokenize(&source);
println!("Document parsed successfully.");
use oak_notedown::{NotedownLexer, NotedownLanguage};
use oak_core::{Lexer, Source};
let language = NotedownLanguage::default();
let lexer = NotedownLexer::new(&language);
let source = Source::new(r#"
## My Heading
Some content here.
"#);
let result = lexer.tokenize(&source);
println!("Heading parsed successfully.");
use oak_notedown::{NotedownLexer, NotedownLanguage};
use oak_core::{Lexer, Source};
let language = NotedownLanguage::default();
let lexer = NotedownLexer::new(&language);
let source = Source::new("# Heading\n\nParagraph text");
let result = lexer.tokenize(&source);
println!("Token parsing completed.");
use oak_notedown::{NotedownLexer, NotedownLanguage};
use oak_core::{Lexer, Source};
let language = NotedownLanguage::default();
let lexer = NotedownLexer::new(&language);
let source = Source::new(r#"
# Heading
This is a paragraph
## Another heading
# Unclosed heading
"#);
let result = lexer.tokenize(&source);
if let Some(errors) = result.errors() {
println!("Parse errors found: {:?}", errors);
} else {
println!("Parsed successfully.");
}
The parser generates a comprehensive AST with the following main structures:
Oak Notedown integrates seamlessly with:
Check out the examples directory for comprehensive examples:
Contributions are welcome!
Please feel free to submit pull requests at the project repository or open issues.