0.3.3 • Published 23 days ago

@brocatel/md v0.3.3

Weekly downloads
-
License
MIT
Repository
github
Last release
23 days ago

Brocatel - Markdown Extensions

This project contains some remark extensions used by Brocatel, a story scripting language with Markdown syntax.

Extensions

directive.ts: Directives

The remark-directive is not really usable in Brocatel: the syntax of it makes nesting structures quite difficult:

:::outer
- List

  :::inner
  Inner
  :::

  Guess what? The `outer` directive ends at the `:::` line right above.

::: <- Useless

We ensure the ease of nesting structures by reusing list semantics: a directive is just a list with a ::: heading. In this way, we can nest things quite easily - all Markdown parsers already do that for lists.

Inline directives are fine.

mdx: MDX Expressions

remark-mdx expects the expressions to be JS expressions, while we use them as Lua ones. So this extension simply serves to avoid those JS syntax checks.