gamburg / margin

Lightweight markup designed for an open mind
https://margin.love
MIT License
189 stars 9 forks source link

What characters can be escaped? #21

Open mtsknn opened 4 years ago

mtsknn commented 4 years ago

Currently the documentation mentions only this regarding escaping:

Escape an annotation with a backslash:

This is an item \[but this is not an annotation]

What other characters can be escaped? Some thoughts:

Also, how should the escape character be interpreted when it's used in front of non-escapable characters? E.g. should the value of foo \bar be foo bar, foo \\bar or something else? (I don't know if this question makes much sense outside of JavaScript.)

gamburg commented 4 years ago

Great. \[ and \] make a lot of sense, as does escapable ornamentation.

My intuition is that colons being escapable feels very coder-centric -- I can't think of a real-world use case of this for a thinker. I suppose someone might want an annotation of type re:finances or something? But it seems like a stretch, and easily circumventable by just specifying a different type (eg. finances).

Then again, I can't think of a good reason why not to allow colons to be escapable, as maybe power users would find this useful once in a while, and the average user never needs to know about it. Seeing as it probably wouldn't weigh down the spec all that much, it seems ok.

And definitely I think the escape character \ should always be interpreted except when used in front of an escapable character.