An open API service indexing awesome lists of open source software.

https://github.com/jogemu/irmd

Turbocharge square brackets with this flavor of MarkDown.
https://github.com/jogemu/irmd

bibliography glossary i18n l10n markdown mention reactive

Last synced: 25 days ago
JSON representation

Turbocharge square brackets with this flavor of MarkDown.

Awesome Lists containing this project

README

        

# 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.

[RFC 5646]: https://datatracker.ietf.org/doc/html/rfc5646

```
📁 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 `[💬]([🟥])`.

[shortcut reference links]: https://spec.commonmark.org/0.31.2/#shortcut-reference-link
[full reference links]: https://spec.commonmark.org/0.31.2/#full-reference-link

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.

[info strings]: https://spec.commonmark.org/0.31.2/#info-string

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 `🟥`.

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:🔷)` | `🟥` |
| `[🟥](abbr:🔷)`
`[🟥](abbr:🔷)s`
`![🟥](abbr:🔷)`
`![🟥](abbr:🔷)s` | `🟥`
`🟥s`
`🔷 (🟥)`
`🔷s (🟥s)` |
| `[🟥](audio:🔷)`
`![🟥](audio:🔷)` | `🟥`
`🟥` |
| `[🟥](base:🔷)` | `` |
| `[🟥](bdo:🔷)` | `🟥` |
| `[🟥](blockquote:🔷)` | `

🟥
` |
| `[🟥](button:🔷)` | `🟥` |
| `[🟥](col:🔷)` | `` |
| `[🟥](colgroup:🔷)` | `🟥` |
| `[🟥](dd:🔷)` | `

🟥

🔷

` |
| `[🟥](del:🔷 🕝)` | `🟥` |
| `[🟥](details:🔷)`
`![🟥](details:🔷)` | `🟥🔷`
`🟥🔷` |
| `[🟥](dfn:🔷)` | `🟥` |
| `[🟥](dialog:🔷)`
`![🟥](dialog:🔷)` | `🟥`
`🟥` |
| `[🟥](embed:🔷)`
`![🟥](embed:🔷)` | `🟥`
`` |
| `[🟥](fieldset:🔷)` | `🟥🔷` |
| `[🟥](figure:🔷)` | `🟥🔷` |
| `[🟥](form:🔷)` | `🟥` |
| `[🟥](iframe:🔷)`
`![🟥](iframe:🔷)` | `🟥`
`🟥` |
| `[🟥](img:🔷)` | `🟥` |
| `[🟥](input:🔷)` | `🟥` |
| `[🟥](ins:🔷 🕝)` | `🟥` |
| `[🟥](label:🔷)` | `🟥` |
| `[🟥](link:🔷)` | `` |
| `[🟥](meta:🔷)` | `` |
| `[🟥](meter:🔷)` | `🟥` |
| `[🟥](picture:🔷)`
`![🟥](picture:🔷)` | `🟥`
`🟥` |
| `[🟥](progress:🔷)` | `🟥` |
| `[🟥](q:🔷)` | `🟥` |
| `[🟥](ruby:🔷)` | `🟥(🔷)` |
| `[🟥](select:🔷)` | `🟥🔷` |
| `[🟥](textarea:🔷)` | `🟥🔷` |
| `[🟥](time:🕝)` | `` |
| `[🟥](track:🔷)` | `` |
| `[🟥](video:🔷)` | `🟥` |