Support more markdown in comments
We support links. test [text](https://google.com) renders like:
Lets add:
-
bold:
**bold**or__bold__ -
italics:
*italics* - lists:
- one
- two
- three
or
* one
* two
* three
And:
- Images:

See https://www.markdownguide.org/basic-syntax
Not supported by markdown:
- Underline
I think this will be the main file: https://github.com/DiscipleTools/disciple-tools-theme/blob/develop/dt-assets/js/comments.js
are we going to want to support all of markdown? or just a subset?
I have bold and italics figured out. Still working on images and lists
Awesome!
Think I have numbered lists working. The other list format is being difficult
Figured I should make a loom to explain where I'm at in the process on this: https://www.loom.com/share/2b62fc6821334cc29c6ed3addceb009f?sid=fa6ccd53-3b65-4d20-8e39-61d5d5e8b474
Thanks for the update @CptHappyHands ! Can you share your code so far? In shared-functions.js there is a "formatComment" function. I think most of we want to do will be there.
For the list: if we can regex the list format and convert it to
<ul style="list-style: disc; padding: revert">
<li style="list-style-type: disc">Item 1</li>
<li style="list-style-type: disc">Item 2</li>
</ul>
(we'll pull the css to the right place later).
It should show:
Same for the images. I think it will work if we regex the ![]() format and transform it into an <img src="https://">.
What block are you coming up against for the images? (Note, we don't need to deal with uploading at this point. We have another feature in the makes that we'll need first)
@CptHappyHands If you can create the PR now and put 'resolves #2427' in the description, then we can track where you're at so far and it will be linked to this issue :)
I just now saw these comments when I came to add the loom video I made to give y'all an update: https://www.loom.com/share/39319e0bb0c849008fec19123d5a44aa?sid=449e16ea-a2e3-4003-94b1-aebb335bc187 Ill check out shared-functions.js since as it may be able to fix the issue I was running in to in that video
Well...moving everything to shared_functions seems to have fixed all of the problems in the loom. So, thats rad. Still haven't managed to find a workaround for the images, though it is at least showing up as an anchor tag now instead of not showing up at all like it was previously
https://www.loom.com/share/05a295c599e7427e95531c6be4e5f28d?sid=a3f1699a-068d-4827-8049-f398cb579130
Got images working as well https://www.loom.com/share/e767e827e871423f8b883002b1f8415a?sid=1d2ba229-f233-4f0c-bd4a-d434ecdde504
Nice work @CptHappyHands!
Nice one 😄