46 lines
1.3 KiB
Plaintext
46 lines
1.3 KiB
Plaintext
.set(headers 3)
|
|
|
|
kettext is designed to be an HTML-friendly markup language that looks nice in plain terminals. Contrary to other markup syntax, kettext attempts to provide very few strict formatting rules, opting instead for intelligent detection of intent.
|
|
|
|
For example, headers do not use specific formatting characters, but rather the repitition of characters in a particular pattern. These patterns may be:
|
|
,,,,
|
|
header
|
|
````
|
|
.,.,.,.,
|
|
Rabble!
|
|
.,.,.,.,
|
|
==== header
|
|
---- header
|
|
~~~~ header
|
|
~~~~ header ~~~~
|
|
|
|
If a character type repeats > 8 times in a line, it triggers a "maybe title" mode
|
|
If another character type repeats > 8 times in the next line, it switches to regular
|
|
If the third line repeats > 8 times, it text between first and now are a title
|
|
|
|
Headers are presumed to be at a depth of 0, but can be overrided by providing a depth override:
|
|
.set(headers 3)
|
|
|
|
Header precidence is for larger lines to be considered as lower (i.e., "`````````" = h1; "````" = h2)
|
|
|
|
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
|
My Header .name(my_header)
|
|
````````````````````````````````
|
|
Some text!
|
|
,,,,,,,,,,,,,,,,
|
|
Sub Header .name(sub_header)
|
|
````````````````
|
|
|
|
= Title .name(title) =
|
|
== Title 2 ==
|
|
=== Title 3 ===
|
|
|
|
This file is an example of kettek text formatting!
|
|
|
|
* list 1
|
|
* list 2
|
|
* list 3
|
|
- list 1
|
|
- list 2
|
|
- list 3
|