Skip to content

Anywhere renderer for HTML-flavoured Markdown-inspired Markout

Notifications You must be signed in to change notification settings

outmark/markout

Repository files navigation

Markout
HTML-flavoured Markdown

Read More

Markout borrows a lot of nice features from Markdown, but uses a completely different rendering architecture that makes it easy to also leverage builtin features of the actual HTML renderer.

While the engine caters primarily to the richer features of the DOM, it does so with clear intent to make it work in a shell-based environment longer-term.

Current experimental efforts divide the rendering into two phases, the first portion uses a custom tokenizer that captures HTML and other notation, yielding the static content (HTML for now) output, the second portion uses a custom element and real-time DOM operations to yield the dynamic content (HTML for now) tailored to every aspect of the user experience.

Compatibility Notes

  • Headings

    • HTML Headings
    • ATX Headings
    • Ruled Headings Excluded
  • Fenced Blocks

    • Syntaxes

      one of md/markdown, html, css, json, js/javascript, es/ecmascript

      defaults to markup

    • Markdown Triple-Grave-Block Notation

      Note: Additionally allows annotations after close fence — not recommended for cross-compatibility.

    • Markdown Triple-Tilde-Block Excluded

    • Markdown Indented-Block Excluded

  • Block Quotes

    • HTML Block/Inline Quotes

    • [-] Markdown Block Quote Notation

      Note: Not yet fully implemented in some places, not limited to lists.

  • Tables

    • HTML Tables
    • Markdown Tables Excluded


Excluded notation is not planned to be supported by the engine directly, but indirect support can potentially be introduced in pre/post transformations.

Features

Styles

  • Markout Attribute Styles

    • <span color:=red>one</span>
      one
      one

    • … <span style:=fence>one</span> …
      … one …
       … one … 

  • Markdown-Style Italics

    • one _two_ three
      one two three
      one two three

    • _one_two_three_
      one_two_three
      one_two_three

    • _one__two__three_
      one__two__three
      one__two__three

    • one *two* three
      one two three
      one two three

    • one*two*three
      onetwothree
      onetwothree

    • *one*_two_*three*
      onetwothree
      onetwothree

  • Markdown-Style Bold

    • one **two** three
      one two three
      one two three

    • one**two**three
      onetwothree
      onetwothree

    • **one****two****three**
      onetwothree
      onetwothree

    • one __two__ three
      one two three
      one two three

    • _one__two__three_
      one__two__three
      one__two__three

    • __one____two____three__
      one____two____three
      one____two____three

  • Markdown-Style Bold + Italics

    • one **_two_ three**
      one two three
      one two three

    • __*one*two*three*__
      onetwothree
      onetwothree

  • Markdown-Style Strikethrough

    • one ~~two~~ three
      one two three
      one two three

    • one~~two~~three
      onetwothree
      onetwothree

    • ~~one~~two~~three~~
      onetwothree
      onetwothree

    • ~~one~~~~two~~~~three~~
      one~~~~two~~~~three
      onetwothree

  • Markdown-Style Escapes (ie not styled)

    • one\*two\*three
      one*two*three
      one*two*three

    • \_one_two_three\_
      _one_two_three_
      _one_two_three_

    • one\**two\**three
      one**two**three
      one**two**three

    • one\*\*two\*\*three
      one**two**three
      one**two**three

    • one\~~two\~~three
      one~~two~~three
      one~~two~~three

    • one\~\~two\~\~three
      one~~two~~three
      one~~two~~three

Links

  • Markdown-Style Links
- [Link]()
- [Link](?)
- [Link](#)
- [Link](./README.md)
- [Link](.)
- [Link](..)
- [Link](/)
  • Markdown-Style References
- [Alias Reference][referenced-alias]
- [Not Alias Reference]
- [Non-Aliased Reference][undefined-alias]

[unreferenced-alias]: ./README.md
[referenced-alias]: ./README.md
  • Alias Reference
  • [Not Alias Reference]
  • [Non-Aliased Reference][undefined-alias]

Note: aliases render as hidden anchors

  • Markout-Style References
- [[Reference Link]]
- [Reference Link][]

[Reference Link]: ?

Note: aliases render as hidden anchors

Lists

Note: Markdown has limited support for this!

  • Markout's Unordered Lists

    • Square

      • Square
        • Square
        • Disc
    • Disc

      • Disc
        • Square
        • Disc
  • Markout's Ordered Lists

    • Latin Numbering

      a) a) Latin (auto) iv. iv. Roman (coerced)

      1. 11. Arabic (coerced) g. g. Latin (coerced) a. h. Latin (auto)
    • Arabic Numbering

      1. 1) Arabic (auto) g. g. Latin (coerced) iv. iv. Roman (coerced)
      1. 11. Arabic (coerced)
      2. 1. Arabic (auto)
    • Roman Numbering

      i. i. Roman (auto) 11. 11. Arabic (coerced) g. g. Latin (coerced) iv. iv. Roman (coerced) i. i. Roman (auto)

  • Markout's Checklists

    • Force-Checked

      • - [x] Checked
        • - [x] Checked
        • [-] - [-] Indeterminate
        • - [ ] Unchecked
    • Force-Indeterminated

      • [-] - [-] Indeterminate
        • - [x] Checked
        • [-] - [-] Indeterminate
        • - [ ] Unchecked
    • Auto-Unchecked

      • - [ ] Unchecked
        • - [x] Checked
        • [-] - [-] Indeterminate
        • - [ ] Unchecked

Headings

  • ATX headings
# Heading 1
---
## Heading 2
---
### Heading 3
---
#### Heading 4
---
##### Heading 5
---
###### Heading 6
---
####### No Heading 7

Heading 1


Heading 2


Heading 3


Heading 4


Heading 5

Heading 6

####### No Heading 7

  • HTML headings
<h1>Heading 1</h1>

---
<h2>Heading 2</h2>

---
<h3>Heading 3</h3>

---
<h4>Heading 4</h4>

---
<h5>Heading 5</h5>

---
<h6>Heading 6</h6>

---
<h7>No Heading 7</h7>

Heading 1


Heading 2


Heading 3


Heading 4


Heading 5

Heading 6

No Heading 7

Heading Groups

Note: Markdown does not support this!

  • Heading groups are created from well-chained heading blocks
# Heading 1
## Subheading

---
## Heading 2
### Subheading
#### Subsubheading

---
# Heading 1
### Heading 3

---
# Heading 1

## Heading 2

Heading 1

Subheading


Heading 2

Subheading

Subsubheading


Heading 1

Heading 3


Heading 1

Heading 2

<style src=./styles/markout.debug.css></style> <script> console.log('a'); </script> <style> /* * { color: blue; } */ </style>

About

Anywhere renderer for HTML-flavoured Markdown-inspired Markout

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published