opmark/
lib.rs

1//! `OpMark` is an experimental markup language focused on presentation making.
2//!
3//! ## Features
4//! - Rich Text
5//! - Ordered/Unordered list
6//! - Image
7//! - Hyperlink
8//!
9//! # Example
10//!
11//! ## A simple OpMark document
12//! ```text
13//! ## This is Page 1
14//!
15//! This is a simple example of *OpMark*.
16//!
17//! ---
18//!
19//! ## This is Page 2
20//!
21//! ### Rich Text
22//! You can markup text using the following syntax:
23//! *bold*
24//! `code`
25//! /italics/
26//! $small$
27//! ~strikethrough~
28//! _underline_
29//!
30//! ### Lists
31//! You can make lists:
32//!
33//! - unordered list
34//!
35//! 1. ordered list as well
36//!
37//! ### Images
38//! ![title of the image](src.png)
39//!
40//! ### Hyperlinks
41//! [Github](https://github.com/)
42//! ```
43//!
44//! ## Using the parser
45//! ```
46//! use opmark::Parser;
47//! use std::{
48//!     fs::read_to_string,
49//!     path::Path,
50//! };
51//!
52//! fn main() {
53//!     let path = Path::new("./foo/bar.opmark");
54//!     let file_content = read_to_string(path).expect("Failed at reading file");
55//!     let parser = Parser::new(file_content);
56//!     for mark in parser {
57//!         // do some stuff
58//!     }
59//! }
60//! ```
61pub mod mark;
62mod parser;
63
64pub use crate::parser::Parser;