saibotsivad / blockdown

A Markdown-like syntax that supports defining blocks of text.
https://blockdown.md/
Other
5 stars 0 forks source link

Multi-line metadata #4

Closed saibotsivad closed 4 years ago

saibotsivad commented 4 years ago

Right now metadata is only allowed on the one line, e.g.:

---!mermaid[size=large,border=true]
    pie title NETFLIX
        "Time spent looking for movie" : 90
        "Time spent watching it" : 10

However, it is very likely that a person (myself included) would want multi-line metadata, primarily because it's easier to read!

The main solution I've been thinking of is another delimiter that goes inside blocks, e.g.:

---!mermaid
size: large
border: true
$$DELIMITER$$
    pie title NETFLIX
        "Time spent looking for movie" : 90
        "Time spent watching it" : 10

In these cases, it can still be the consumers responsibility to determine the metadata structure, aka JSON or ini etc.

Within YAML, which is a heavy influence, there's the idea of the document start --- and the document end ..., so it could be that a block is an implicit single document unless there's a document end in the middle.

saibotsivad commented 4 years ago

Multi-line metadata added here: https://github.com/saibotsivad/blockdown/pull/5