What is the use of ~~~~~ in comments, and why does it add < br / > to the end of words

Yesterday, I don’t know why I decided to put ~~~~~ in a comment to see what happened. So what happened was that a strange bar appears.


If I add a word next to that the word disappears.


If I put the word in a line below, the word appears inside the bar but (< br / >) is added


I know it’s probably not a big deal since I don’t think many people use ~~~~~ for something, but I found it curious that this happened.

1 Like

I tried it, and the same thing happened. Like you, I have no idea.

https://www.inaturalist.org/posts/38475-less-agreeable-observations-more-agreeable-text-formatting

https://www.markdownguide.org/cheat-sheet/

This may be related to this bug: https://forum.inaturalist.org/t/renders-as-br-in-observation-comments-ids/17361

However, I’m not aware of any version of Markdown that gives a special meaning to a row of tildes. Two tildes are generally used for strikethrough font (coded as ~~strikethrough~~). Regardless of how it’s supposed to be interpreted, the <br /> should never show in the final rendering.

some implementations of “extended” markdown use three tildes ~~~ to mark the beginning and end of blocks of code. so that’s why you see a gray box around the resulting text. the extra <br /> seems to be related to whatever was going on in that other bug report, and there also seems to be the additional problem of stuff after the first <p> </p> not getting formatted properly (also mentioned in that bug report discussion). once you begin the code block using ~~~, you can’t seem to close it with a subsequent ~~~.

2 Likes

This should be fixed now.

1 Like

i can confirm that this particular problem seems to be resolved.

2 Likes