Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numbering is reset if there are photos in the list #128

Open
shapironick opened this issue Feb 26, 2018 · 4 comments
Open

Numbering is reset if there are photos in the list #128

shapironick opened this issue Feb 26, 2018 · 4 comments
Labels
Milestone

Comments

@shapironick
Copy link

I went in to edit this note and after doing something unrelated to a list that I had in there with instructions the numbered list of instructions started not working properly.

It looks like this in the editor:
screen shot 2018-02-25 at 11 04 34 pm
But looks like this when displayed:
screen shot 2018-02-25 at 11 05 14 pm

It wasn't an issue in the note as originally published and I did not click the rich text editor button.

@jywarren
Copy link
Member

jywarren commented Mar 1, 2018

This is a doozy -- very frustrating for any Markdown system. It is an upstream issue but I wish we could think about a clever way around it.

Basically, and as I type this i'll demo it on GitHub's Markdown:

  1. adding an image (or other things like tables) inserts new lines, essentially "ending" the numbered list.

pl-narrow

  1. Markdown doesn't know how to detect that you want to "resume" a prior numbered list instead of starting a new one.
  2. hello

However it seems GitHub has modified Markdown to change this behavior, so I think we could too...

My thought is -- maybe we can modify standard markdown behavior in a few ways:

  1. not auto-convert all numbered lists to just 1., 1., 1., which some Markdown parsers do because this is a widely held belief that Markdown should handle the actual incrementing so you can easily add a number in the middle of a list and not have to renumber it (try this in the preview function of GitHub comments to see it happening). So we'd disable woofmark's auto-conversion if it does that (i think it does)
  2. (this would have to be an upstream change to woofmark) so that if a numbered list starts with a digit other than 1, we start numbering from that

Having played with GitHub's Markdown system, I think that's what's happening here, or pretty close. We can implement 1. ourselves right now, and then file 2. with the Woofmark maintainers and try to get that adopted there, citing that GitHub does this.

How does this sound?

@shapironick
Copy link
Author

shapironick commented Mar 1, 2018 via email

@sashadev-sky
Copy link
Member

@jywarren @shapironick I just checked this out and it works as long as you add the image after saving the number list fyi if you want to fix your research note!

@shapironick
Copy link
Author

shapironick commented Oct 23, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants