List parsing issues?
I've been experiencing issues with list items and in particular newly created list items. Before adding text, they are making the items above render as headings and any child items render in a monospaced pre format. As soon as text is entered the style is correct, but this means that typing out a list causes rapid and frequent alterations to the editing and preview panes. I'm on Yosemite and seeing this in both the current shipping version and the v3 beta. Is this correct behavior? A bug? Something I can fix somehow? I've attached a sample file which will hopefully replicate and illustrate what I'm describing.
Thank you so much for your time and help and all the hard work you put into this app. I have been over dozens of markdown applications and the flexibility and quality of support I've seen with MMC is head and shoulders above the rest. It's clearly a labor of love.
- List_Parsing_Examples.md 1.92 KB
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac
Support Staff 1 Posted by Fletcher on 16 Jun, 2015 12:42 PM
Matthew,
Thanks for writing in.
The example document you sent shows something that is not a list, at
least according to strict Markdown interpretation:
Foo
---
is a header. As is:
Foo
-
The empty list item in the middle of your list is saying that the
preceding line is a header. Which means that the following lines can't
be a list, so they have to be a code block.
One can debate whether Markdown implementations should be "smart" enough
to know, "Well, I don't *really* mean a header here, even though that's
what I wrote, I mean an empty list item." And in fact some
implementations do this:
<http://tinyurl.com/o54a7by>
I'll look at MMD's list parsing and see about changing the definition of
a list vs header. I've done something similar so that the *last* item
in a list is still a list item, even if it's empty. But I haven't done
it for items inside the list. And even then, it doesn't include the "-"
list marker, since that indicates a header. In other words, these are
different:
+ one
+ two
+
and
- one
- two
-
**BUT** -- for now, Composer's behavior is correct. What you typed, at
that moment, is not a list. Composer's highlighting is based on exactly
what is there (as interpreted by Markdown/MultiMarkdown), not what
*might* be there in the future.
Fletcher
PS> Thank you for kind words -- I definitely have put a lot of time
into both MultiMarkdown and Composer. But they are also tools I use on
an almost daily basis -- that helps me want to make sure I get them right!!!
2 Posted by Matthew on 16 Jun, 2015 06:28 PM
Ah, thank you, that's very helpful. I was aware of that header syntax but it never even entered my mind that a single "-" would (correctly) be interpreted as such. I may be mistaken, but reading over the markdown syntax, I don't see anything which precludes an empty list item. It would seem those particular header and list styles are a bit in conflict as markdown is defined. That being the case, maybe a little intelligence is warranted. The rapid shifts in position, color and size that were happening as I made new list items were quite disorienting. Either way, I appreciate your concern for correctness and there are, as you reminded me, alternate non-ambiguous markers.
Thanks so much for your time and thorough answer.
Support Staff 3 Posted by Fletcher on 16 Jun, 2015 09:18 PM
I *think* I'll be able to differentiate a single '-' inside a list from
a single '-' that is clearly a header.
This is one of the problems with Markdown proper -- Gruber has made it
clear that the Perl implementation is the canonical definition, even
when it's buggy, inconsistent, or could be improved. From what I
remember, the perl list implementation does preclude empty list items --
which makes sense. Why would you have an empty list item?
The problem comes in when you apply syntax highlighting *while* you're
typing.
F-
Fletcher closed this discussion on 10 Dec, 2015 11:27 PM.