Mise en surbrillance du texte CommonMark dans Discourse ?

Probably not really a bug but, I know that “standard” Markdown discussions are somewhat fraught and this question seems to not be dealt with in the latest ComonMark spec but…

It appears that, in accordance with at least one (the Ghost project) guide of the CommonMark spec:

~~strikethrough~~

should give you a strikethrough (and it does) but

==highlight==

should give you a ==highlight== text - and it doesn’t.

Attempting to use <span style=“background-color:yellow;”> tags or other means seems to also not work for me…

So, based on the CommonMark used by Discourse, is there a way to do text highlighting? Is there a better guide for us to use to get answers to questions like this?

3 « J'aime »

La version de Markdown de Ghost est entièrement conforme à CommonMark avec quelques autres fonctionnalités utiles comme les notes de bas de page.

Le <mark>Texte surligné</mark> fait partie des « quelques autres ».

<mark>Texte surligné</mark> fait partie des « quelques autres ».

Vous pouvez essayer d’intégrer GitHub - markdown-it/markdown-it-mark: <mark> tag plugin for markdown-it markdown parser · GitHub en tant que plugin en utilisant Developer's guide to Markdown extensions.

9 « J'aime »

Interesting (but, beyond what I can do in the 2 weeks I have to put into this at this time)…

Playing on the Markdown-it demo page, exactly what I want is available. Off hand, do you know if:

  1. The version of Markdown-it included in Discourse is feature hobbled in some way?
  2. Markdown-it might be an older version in the Discourse release?

(I know that this is easily found out by me but you were so quick in responding before that I’m now a spoiled user dependent on you :grin:)

We use just markdown-it.

That demo also supports footnotes which are a markdown-it plugin, that we provide at Discourse Footnote.

3 « J'aime »

Good catch and clue…

On our test site, installed Discourse footnote plugin and footnotes work fine (settings are all turned on) but highlighting is still as before…

Thanks again for your suggestion…

Someone would have to re-package the highlight markdown-it plugin into a Discourse plugin for it to become available. You could likely take a stab at it by forking the footnote plugin and finding all instance of footnote and replacing it with “mark”

8 « J'aime »

This caught my interest as I thought it would useful on my installation as well. So here is a plugin for highlighting. Being as it is my first plugin, I suspect it needs a fair bit of cleanup even with having used other plugins as templates/inspiration. It did work in my test environment though.

10 « J'aime »

I added you to the @plugin_authors group so feel free to do a full post in plugin about it!

3 « J'aime »

We already have insert and delete

We already have <ins>insert</ins> and <del>delete</del>

8 « J'aime »

J’aimerais beaucoup utiliser cela, @sirideain !

Je rencontre ce message :
““Erreur d’importation : le fichier about.json n’existe pas ou est invalide. Êtes-vous certain qu’il s’agit d’un thème Discourse ?””

Merci.

Il s’agit d’un plugin, et non d’un thème. Vous devrez consulter Install plugins on a self-hosted site

3 « J'aime »