Whitespace before or after bold markers causes bold not to work

Okay,
Not sure if this is standard markdown or Discourse bug, but if you use markdown and have a whitespace before/after the text it breaks:

This works fine when I use the bold button
** This doesn’t since I have a space before the text**
**And this doesn’t since I have a space after the text **

The issue is users don’t know that and sometimes by accident leave a space, publish and don’t understand what’s wrong/why it doesn’t work. I already saw some places where users have made this mistake…

Code for the examples above:

**This works fine**
** This doesn't since I have a space before the text**
**And this doesn't since I have a space after the text **

I’m pretty sure this is markdown spec, not Discourse. An engineer should be able to confirm.

4 Likes

Yes, there are reasons MD has specs, and reasons that users should take 3 minutes of time and learn to use MD correctly (sorry to reply so directly and technically… ). It’s pretty simple, very basic markup syntax, actually:

See also:

Look at Visual Studio Code, for example:

Here is the MD

Screen Shot 2021-02-12 at 8.24.50 PM

Here is the MD preview

Screen Shot 2021-02-12 at 8.26.35 PM

I think this clear shows it is not a “Discourse” issue, but it is simply an issue with users not using MD correctly.

VSC actually highlights the MD syntax error(s), @tpetrov

Okay,
Now I see it’s not a bug.
The problem is the people, though. Nowadays it’s hard to make them read something for 3 seconds and you want them to take 3 minutes. I don’t see a way to achieve it, really.

MD syntax error highlighting would be helpful actually.

2 Likes

Hmm.

Well, we have been running a coding forum for over two decades, and we find users will learn whatever we asked them to learn if we explain to them or provide them a link to a tutorial; and when users make a mistake our mods edit the posts and correct the formatting.

It’s never been an issue for us in over two decades using the legacy old “BBCODES” and now Markdown; but then again, our site is a tech forum and we expect users to be technical and put their own effort into their work :slight_smile:

Actually, we consider teaching people how to think and how to solve their own problems part of our core mission; and if someone cannot spend a few minutes to learn MD, then they have a problem, not our forum and members; and are not welcome on our site.

But, then again, our site does not exist to “please everyone” and we have high standards and my experience is that people will learn if they know what is expected of them, in the rules of the site (or other cultural norms).

As always, YMMV and your users may be much less tech-oriented than ours.