Skip to content
/ irmd Public

Turbocharge square brackets with this flavor of MarkDown.

License

Notifications You must be signed in to change notification settings

jogemu/irmd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
Nov 29, 2024
Dec 12, 2024

Repository files navigation

Internationalized Reactive MarkDown

Turbocharge square brackets with this flavor of MarkDown. Frameworks may grant them access to everything a reactive template can access. Provide a MarkDown file in multiple languages to make the experience internationalized. These changes are likely to cause undesired results when using other MarkDown flavors. A careless conversion can lead to a different semantic meaning or errors.

Important

Extensive incompatibilities with CommonMark, GitHub-flavored MarkDown and many more.

Structure

Most lines in the following example are named after their purpose.

Title ⚠️

Description ...

#keyword
@author
[en-US]
2024-01-01
[canonical](https://github.com/jogemu/irmd)

```yaml
metadata: yes
``` ⚠️

---

# Heading ⚠️

[Summary](details:Details)

* [Description List](dd:Contains groups of terms and their descriptions.)

[CSS](abbr:Cascading Style Sheet)

[Referenced]([^1])[^2]

[1]: https://github.com "GitHub" @github @microsoft 2024
[2]:
Footnotes may span

over multiple lines
until double newline


@mention
#hashtag

Although a file is valid on its own, it is recommended to store it in a folder to better accommodate multiple languages and shared logic. This relationship can be made explicit by using a valid RFC 5646 language as the filename.

πŸ“ project name
β”œβ”€ πŸ“ file name
β”‚  β”œβ”€ πŸ“„ en.md
β”‚  β”œβ”€ πŸ“„ de.md
β”‚  └─ πŸ“„ fr.md
└─ πŸ“ component name
   β”œβ”€ πŸ“„ en-US.md
   β”œβ”€ πŸ“„ data.json
   β”œβ”€ πŸ“„ angular.js
   β”œβ”€ πŸ“„ react.js
   └─ πŸ“„ vue.js

Fundamentals

The fundament of this flavor is the syntax [πŸŸ₯](🟒:πŸ”·), whose short form [πŸŸ₯](πŸ”·) is equivalent to how other flavors allow links and images. In this case 🟒: corresponds to https: or file: when omitted. πŸŸ₯πŸŸ’πŸ”· may contain newlines only if newlines are present directly after every opening and directly before every closing bracket/parentheses that encloses newlines. Unbalanced brackets/parentheses must be escaped with a backslash that is itself unescaped.

If [πŸŸ₯] is not followed by ( it is equivalent to above if πŸŸ₯ is defined as 🟒:πŸ”· by the framework or in the markdown file. The latter is achieved using [πŸŸ₯]:(🟒:πŸ”·) surrounded by newlines. It is allowed to omit ( and ) if 🟒:πŸ”· does not contain consecutive newlines. No omission of otherwise necessary newlines. Thus, the shortest form [πŸŸ₯]: πŸ”· is equivalent to shortcut reference links. However, the syntax for full reference links changed to [πŸ’¬]([πŸŸ₯]).

Full references are merely the introduction to nesting. πŸŸ₯πŸ”· can contain any combination of the variations introduced above. Since HTML only supports one href attribute per link, the meaning of additional values must be defined. Either explicitly with 🟒 or by recognizing patterns such as standardized timestamps or email addresses. This provides an easy way to add bibliographic information to a source, similar to how info strings provide a title.

If πŸ”· starts with an url to media such as images, videos, audio and documents then it can be embedded using ![πŸŸ₯] or ![πŸŸ₯](🟒:πŸ”·). Specify the media type with 🟒 if the file extension at the end of the url is unreliable. Compared to HTML, controls are not hidden by default. The behavior is different for non-media. Exclaimed HTML details/dialog elements are opened and abbreviations like ![πŸŸ₯](abbr:πŸ”·) are πŸ”· (πŸ’¬) instead of just πŸ’¬, where πŸ’¬ is <abbr title="πŸ”·">πŸŸ₯</abbr>.

The plural of abbreviations and i18n properties is available using [πŸŸ₯]s to get πŸ’¬s and ![πŸŸ₯]s to get πŸ”·s (πŸ’¬s). [^πŸŸ₯] links to the first embed of πŸŸ₯, πŸ”· in the printed bibliography or πŸ”· as a footnote. A single line of a file or a single page of a can be referenced using [^πŸŸ₯#L2] or [^πŸŸ₯#page=2].

Slimmer

Building on this, the following short forms are translated into the foundation.

Meaning Shortened [πŸŸ₯](🟒:πŸ”·)
Italic ➑️*πŸ†‘*➑️ [πŸ†‘](em:)
Bold ➑️**πŸ†‘**➑️ [πŸ†‘](strong:)
Code ➑️`πŸ†‘`➑️ [πŸ†‘](code:)
Heading β†©οΈπŸ”# πŸ†‘ [πŸ†‘](hπŸ”’:)
Blockquote
↩️> πŸ†‘ [πŸ†‘](blockquote:)
Block
↩️```🟒
↩️πŸŸ₯
↩️```
[
πŸŸ₯
](🟒:)
  • List
  1. List
Summary
Definition
↩️* πŸ†‘
β†©οΈπŸ”’. πŸ†‘
↩️* [πŸŸ₯](dd:πŸ”·)
[](ul:[πŸ†‘])
[](ol:[πŸ†‘])
[](dl:{πŸŸ₯:πŸ”·})
Person βž‘οΈπŸ”€@πŸ”‘βž‘οΈ
➑️@πŸ”€βž‘οΈ
ORCID
[πŸ”€](mailto:πŸ”€@πŸ”‘)
Time βž‘οΈπŸ•βž‘οΈ [πŸ•](time:πŸ•)
Subscript $_πŸ†‘$ [πŸ†‘](sub:)
Superscript $^πŸ†‘$ [πŸ†‘](sup:)
Keyboard [βŒ¨οΈπŸ†‘] [πŸ†‘](kbd:)
Marked [πŸŸ¨πŸ†‘] [πŸ†‘](mark:)
definition
➑️ space, start or end of line
πŸ†‘ πŸŸ₯ without leading/trailing spaces and newlines
↩️ newline followed by no spaces
πŸ” repeat character to the right 0 to ∞ times
πŸ”’ placeholder for one number
πŸ”€ String without spaces, unescaped @ and newlines
πŸ”‘ String without spaces, unescaped @ and newlines
πŸ• date, time, both or duration

The head goes until before the first heading or after the first code block, whichever comes first. It starts at the beginning of the file and can be empty or contain the entire file. Put metadata and information usually found on the front matter there.

Default attributes

MD HTML
[πŸŸ₯](a:πŸ”·) <a href="πŸ”·">πŸŸ₯</a>
[πŸŸ₯](abbr:πŸ”·)
[πŸŸ₯](abbr:πŸ”·)s
![πŸŸ₯](abbr:πŸ”·)
![πŸŸ₯](abbr:πŸ”·)s
<abbr title="πŸ”·">πŸŸ₯</abbr>
<abbr title="πŸ”·">πŸŸ₯</abbr>s
πŸ”· (<abbr title="πŸ”·">πŸŸ₯</abbr>)
πŸ”·s (<abbr title="πŸ”·">πŸŸ₯</abbr>s)
[πŸŸ₯](audio:πŸ”·)
![πŸŸ₯](audio:πŸ”·)
<a href="πŸ”·">πŸŸ₯</a>
<audio controls src="πŸ”·">πŸŸ₯</audio>
[πŸŸ₯](base:πŸ”·) <base href="πŸ”·"/>
[πŸŸ₯](bdo:πŸ”·) <bdo dir="πŸ”·">πŸŸ₯</bdo>
[πŸŸ₯](blockquote:πŸ”·) <blockquote cite="πŸ”·">πŸŸ₯</blockquote>
[πŸŸ₯](button:πŸ”·) <button type="πŸ”·">πŸŸ₯</button>
[πŸŸ₯](col:πŸ”·) <col span="πŸ”·"/>
[πŸŸ₯](colgroup:πŸ”·) <colgroup span="πŸ”·">πŸŸ₯</colgroup>
[πŸŸ₯](dd:πŸ”·) <dl><dt>πŸŸ₯</dt><dd>πŸ”·</dd></dl>
[πŸŸ₯](del:πŸ”· πŸ•) <del cite="πŸ”·" datetime="πŸ•">πŸŸ₯</del>
[πŸŸ₯](details:πŸ”·)
![πŸŸ₯](details:πŸ”·)
<details><summary>πŸŸ₯</summary>πŸ”·</details>
<details open><summary>πŸŸ₯</summary>πŸ”·</details>
[πŸŸ₯](dfn:πŸ”·) <dfn title="πŸ”·">πŸŸ₯</dfn>
[πŸŸ₯](dialog:πŸ”·)
![πŸŸ₯](dialog:πŸ”·)
<dialog>πŸŸ₯</dialog>
<dialog open>πŸŸ₯</dialog>
[πŸŸ₯](embed:πŸ”·)
![πŸŸ₯](embed:πŸ”·)
<a href="πŸ”·">πŸŸ₯</a>
<embed src="πŸ”·"/>
[πŸŸ₯](fieldset:πŸ”·) <fieldset><legend>πŸŸ₯</legend>πŸ”·</fieldset>
[πŸŸ₯](figure:πŸ”·) <figure><figcaption>πŸŸ₯</figcaption>πŸ”·</figure>
[πŸŸ₯](form:πŸ”·) <form method="πŸ”·">πŸŸ₯</form>
[πŸŸ₯](iframe:πŸ”·)
![πŸŸ₯](iframe:πŸ”·)
<a href="πŸ”·">πŸŸ₯</a>
<iframe src="πŸ”·">πŸŸ₯</iframe>
[πŸŸ₯](img:πŸ”·) <img src="πŸ”·" alt="πŸŸ₯"/>
[πŸŸ₯](input:πŸ”·) <label><span>πŸŸ₯</span><input value="πŸ”·"/></label>
[πŸŸ₯](ins:πŸ”· πŸ•) <ins cite="πŸ”·" datetime="πŸ•">πŸŸ₯</ins>
[πŸŸ₯](label:πŸ”·) <label for="πŸ”·">πŸŸ₯</label>
[πŸŸ₯](link:πŸ”·) <link href="πŸ”·" rel="πŸŸ₯"/>
[πŸŸ₯](meta:πŸ”·) <meta name="πŸ”·" content="πŸŸ₯"/>
[πŸŸ₯](meter:πŸ”·) <label><span>πŸŸ₯</span><meter value="πŸ”·"></meter></label>
[πŸŸ₯](picture:πŸ”·)
![πŸŸ₯](picture:πŸ”·)
<a href="πŸ”·">πŸŸ₯</a>
<picture><source srcset="πŸ”·"/>πŸŸ₯</picture>
[πŸŸ₯](progress:πŸ”·) <label><span>πŸŸ₯</span><progress value="πŸ”·"></progress></label>
[πŸŸ₯](q:πŸ”·) <q cite="πŸ”·">πŸŸ₯</q>
[πŸŸ₯](ruby:πŸ”·) <ruby>πŸŸ₯<rp>(</rp><rt>πŸ”·</rt><rp>)</rp></ruby>
[πŸŸ₯](select:πŸ”·) <label><span>πŸŸ₯</span><select>πŸ”·</select></label>
[πŸŸ₯](textarea:πŸ”·) <label><span>πŸŸ₯</span><textarea>πŸ”·</textarea></label>
[πŸŸ₯](time:πŸ•) <time datetime="πŸ•">πŸŸ₯</time>
[πŸŸ₯](track:πŸ”·) <track src="πŸ”·"/>
[πŸŸ₯](video:πŸ”·) <video controls><source src="πŸ”·"/>πŸŸ₯</video>

About

Turbocharge square brackets with this flavor of MarkDown.

Topics

Resources

License

Stars

Watchers

Forks