Non-standard Markdown Parsing

Steps to reproduce

Enter any text and surround it with double underscore/asterisk.
Enter any text and surround it with single underscore/asterisk.

Expected result

Single underscore/asterisk should result in italic text
Double underscore/asterisk should result in bold text

Actual result

Double asterisk is required for bold
Double underscore is required for italic

Environment

Chromium on Windows (SR Ware Iron browser) or Chromium OS (Cloudready)


Additional information

I notice that your markdown differs in another way from the official version. Check the section on emphasis and you will see.

You can also compare the Markdown syntax guide for these very forums you yourselves use!!!

Normally double asterisk OR double underscore means bold. And single asterisk OR single underscore means italic.


Additional comments

The wonderful thing about standards is there are so many to choose from!!!

3 Likes

You can also look at http://commonmark.org/ for more information, that’s what Discourse references on their homepage.

Which markdown parser is Dynalist using? Did you write your own?

I really would prefer following the standard one asterisk or underscore for emphasis and double asterisk or underscore for strong. So that I’m not trying to remember which Markdown standard to use everywhere.

Thanks,

2 Likes

good points. Confirmed. Trello, too, uses that standard: double is bold, single is italic.

Somewhat awkward to fix retroactively. You’d have to search & replace the double underscores for all users…

True that.

The change needs to be managed. Probably once implemented the first time someone logs in they’re going to be notified that an automatic search & replace is about to take place with the option to postpone it (until a final cut-over date). Once you’ve accepted the update you get the new standard parser; but until you accept the update you’re running the old proprietary parser.

But at least it’s only double underscore that you need to search & replace, with either single underscore or single asterisk. Maybe even give people the choice which they would prefer in the settings when you use the keyboard short-cut and apply that to the search & replace as well.

I just wanted to point out that Dropbox Paper gets Markdown right(er, 'ish).

They’ve added a couple things like Blockquotes (which would only be useful inside a note in Dynalist) and Task List (which is not formatting and what Dynalist is all about already).

1 Like

Hmm I somehow missed this post from all this long ago, sorry about that!

Quick history

The biggest reason why we’ve ended up this way, with a partial support for Markdown and also definitely non-standard, is that Dynalist doesn’t advertise itself as a pure markdown editor.

First, we have users who use formatting infrequently, and don’t expect to be writing in a syntax like markdown, and so to avoid the confusion, we’ve initially changed some of our markdown features to have a lower chance of accidentally clashing with plain text usage of Dynalist. For example, some users might not expect a single asterisk to bold their text, as they’re probably just doing some math.

The next consideration is that we only wanted partial Markdown support, for inline formatting only. We didn’t need any of the paragraph formatting, making lists, etc, because it would be unnatural to use those instead of Dynalist’s bullet structure.

But in the end, we ended up with a weird format (that also grew to accommodate our other features like latex, date, etc). We admit that it’s pretty broken.

####Moving forward
This has been something we wanted to fix, but we want to do it right. This means that it’s going to be a lot of work coming up with a format that works with everything Dynalist can currently do, which can be easily converted from the current format, and it also has to support WYSIWYG which is expected from many non-advanced users.

Much of the work in that regard comes from rewriting the entire document editor to work with a WYSIWYG editor, how to render it properly, working with selections and history (for example, when you undo or redo, properly setting the cursor or selection box), supporting a variety of ways a user can copy from and paste to other editors, exporting, etc. That’s not to mention the amount of work we need to put in for migrating from the current format, making sure you don’t end up with a half, or wrongly converted document, making sure collaboration doesn’t screw up the conversion, making sure that users who use our offline-enabled apps don’t sync the old format into an already converted document, etc.

So… we’ve been waiting for a good timing to fix this. In the meantime, we are collecting the pieces necessary to make the hard decisions, such as what people need to get their work done, what people expect the system can and should do, etc.

2 Likes

I don’t really understand what is planned, but I hope it can import Markdown text better from other apps. Right now if I use a Markdown editor to write something like

`## Header

  • Preformatted text`

Dynalist preserves the ## and the * instead of converting it or ignoring it. It would be better if this was handled better on both import and export.

Header and bullet points are not converted automatically at the moment, sorry. There should be a dedicated import option for Markdown as we don’t want to assume it’s Markdown just by looking at the “##” part and the “*” part, it’s not as obvious as OPML.

1 Like