touchmarine / to

📜 Touch Lightweight Markup Language; Familiar, Extendable, Auto-Formattable
http://touchlabs.io/play
MIT License
19 stars 1 forks source link
html language markdown markup-language touch writing

📜 Touch

Go Reference | Playground | MIT License

Touch is a lightweight markup language. It uses puncutation characters to inscribe meaning to otherwise plain text. The grammar is simple to parse, allowing for easy tooling.

Touch in a few bullet points:

Online playground: http://touchlabs.io/play

Locally

  1. Install the latest binary from Releases or run go get github.com/touchmarine/to if you have Go installed.
  2. Run to version to verify it's working.
  3. Run to build html < file.to > file.html to convert Touch to HTML. Use to help for details.

Auto-Formatting

to fmt < file.to 1<> file.to                # 1<> to write to same file we read from
to fmt -linelength 80 < file.to 1<> file.to # hard-wrap at 80 columns

Elements

See the default config for reference of all elements that come with Touch by default.

Block Elements

This is a quick reference of some common block elements:

/ this is a block comment

= Title
_ Subtitle

== h2
=== h3

/ numbered headings (prefixed with 1 and 1.1)
## h2
### h3

> blockquote
* note
- list
1. numbered list

/ code block
`js
function num() {
    return 1
}
`

/ preformatted block
'
      ___________________________
    < I'm an expert in my field. >
      ---------------------------
          \   ^__^
           \  (oo)\_______
              (__)\       )\/\
                  ||----w |
                  ||     ||
'
/ art from https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre#example

Inline Elements

This is a quick reference of some common inline elements:

// an inline comment //
__emphasis__ // italics //
**strong**   // bold //
``code``
((link))
[[link text]]((link URL))

a \ // line break //
b

/ autolinks
www.example.test
http://example.test
https://example.test

Learn More

Checkout the TOUR.

Get in Touch

Ha, get it? In Touch? Anyway, you can reach me at scout at touchlabs.io. I would love to hear your thoughts.