#markup-language #presentation #parser #experimental #text #list #rich

opmark

An experimental markup language focused on presentation making

3 releases

0.0.3 Jun 2, 2022
0.0.2 Jun 2, 2022
0.0.1 Feb 26, 2022

#9 in #rich

Download history 6/week @ 2024-02-17 45/week @ 2024-02-24 2/week @ 2024-03-02 1/week @ 2024-03-09

54 downloads per month
Used in opmark-egui

MIT license

34KB
705 lines

OpMark

Latest version Documentation MIT

OpMark is an experimental markup language focused on presentation making. It's still in pre-alpha stage.

Features

  • Rich Text
  • Ordered/Unordered list
  • Image
  • Hyperlink

Example

A simple OpMark document

## This is Page 1

This is a simple example of *OpMark*.

---

## This is Page 2

### Rich Text
You can markup text using the following syntax:
*bold*
`code`
/italics/
$small$
~strikethrough~
_underline_

### Lists
You can make lists:

- unordered list

1. ordered list as well

### Images
![title of the image](src.png)

### Hyperlinks
[Github](https://github.com/)

WARN: OpMark uses different codes for EOL(end of line/line break) in different systems: \r\n(CRLF) in Windows, \n(LF) in others.

Using the parser

use opmark::Parser;
use std::{
    fs::read_to_string,
    path::Path,
};

fn main() {
    let path = Path::new("./foo/bar.opmark");
    let file_content = read_to_string(path).expect("Failed at reading file");
    let parser = Parser::new(file_content);
    for mark in parser {
        // do some stuff
    }
}

No runtime deps