MacDownApp / macdown

Open source Markdown editor for macOS.
https://macdown.uranusjr.com/
9.43k stars 1.09k forks source link

Show / Hide content or different color inside "< >" #920

Closed nioudelit closed 6 years ago

nioudelit commented 6 years ago

Hello ! :-)

For write an invisible note, I use "< … >". For exemple: _To be or not to be_ <William Shakespeare, _Hamlet_, p.400.> means that life is hard.

I use this because it's very adventageous for import a markdown file inside Indesign for notes's automatisation and the content don't appear on the preview. But sometimes, when I write a large quantity of notes, readability disappears on MacDown:

L'esthésique<Paul Valéry, Poétique, p.3> est une esthétique qui renoue avec l'aisthésis<vient du grec qui signifie "sentir"> tel que Beuys<Artiste né en 1921 connu pour ses performances et ses prises de positions poético-sociales> l'a expérimenté dans ses investigations poétiques.

The possibility to hide/to show the content inside "<>" on editor mode would be great ! (For exemple with participation of the mouse).

L'esthésique<> est une esthétique qui renoue avec l'aisthésis<> tel que Beuys<> l'a expérimenté dans ses investigations poétiques.

Or maybe a different coloration could be more in the philosophy of the software… Maybe It's a stupid idea ahah :-) (i hope not ;-)

Thank you very much for your work 👍 , nioudélit

uranusjr commented 6 years ago

Unfortunately, to stay compatible with HTML, Markdown reserves angle brackets to signify HTML tags, so it is not viable to do this directly. We can do some clever word boundary detection to make this work sometimes, but the trick is not as mature in general. It might improve in the future, but for now you have two choices:

First, use HTML percentage escapes. < is &lt;, and > is &gt; (less than and greater than, if you’re wondering what those letters mean).

Second, use ‹ and ›. Those are called single left/right-pointing angle quotation marks, and as you can tell from the name, what you should use in this context instead of angle brackets. They are available via opt-shift-3 and 4. This is the best approach here IMO, and also better writing style in general, whether Markdown or not.

FranklinYu commented 6 years ago

HTML comment also works in this scenario, but I’m not sure whether it’s supported by InDesign (I assume you are talking about Adobe InDesign).

nioudelit commented 6 years ago

Thanks you for answers ! :-)

uranusjr commented 6 years ago

I assume there’s nothing to fix then?

nioudelit commented 6 years ago

yes, nothing