Code52 / DownmarkerWPF

MarkPad - a visual Markdown editor (inspired by the Downmarker project)
http://code52.org/DownmarkerWPF/
Microsoft Public License
1.4k stars 459 forks source link

Lists should try to increment #439

Open mirhagk opened 9 years ago

mirhagk commented 9 years ago

If you have

1. 
2. 
3. 

Markpad will correctly start the next line as 4.. But if you only have 1. it starts off the next line as 1.. While this doesn't change the final product in any way, it's slightly annoying that it only enumerates once you manually fix 1. to 2.

JakeGinnivan commented 9 years ago

This is because markdown will automatically number if all numbers are 1. So if you insert a new entry you do not have to renumber everything.

Sent from my Windows Phone


From: Nathan Jervismailto:notifications@github.com Sent: ý20/ý11/ý2014 23:28 To: Code52/DownmarkerWPFmailto:DownmarkerWPF@noreply.github.com Subject: [DownmarkerWPF] Lists should try to increment (#439)

If you have

1. 2. 3.

Markpad will correctly start the next line as 4.. But if you only have 1. it starts off the next line as 1.. While this doesn't change the final product in any way, it's slightly annoying that it only enumerates once you manually fix 1. to 2.

— Reply to this email directly or view it on GitHubhttps://github.com/Code52/DownmarkerWPF/issues/439.

mirhagk commented 9 years ago

Yes I know Markdown does automatically number, which means that this still produces the correct output, but it's an inconvenience when it works one way if you have a 2. already and another way if you have a 1.. At the very least it should be consistent.

I can see the benefit of having only 1. but I'd rather at least start out with the right numbers, and then just don't renumber afterwards. I'm sure others may disagree. So perhaps this should be a configurable value? Especially since most of the other editors I've used that do auto-numbering try to increment the number for you, and that any non-markdown editor will auto-increment so it's probably what users are more familiar with.

JakeGinnivan commented 9 years ago

Yep sure, happy to accept a change around this :) Was more just saying that is why it is like that.

mirhagk commented 9 years ago

Okay sweet. I can see where the code is, so I'll do a pull request then?

JakeGinnivan commented 9 years ago

Yep, that would be great

Sent from my Windows Phone


From: Nathan Jervismailto:notifications@github.com Sent: ý21/ý11/ý2014 16:16 To: Code52/DownmarkerWPFmailto:DownmarkerWPF@noreply.github.com Cc: Jake Ginnivanmailto:jake@ginnivan.net Subject: Re: [DownmarkerWPF] Lists should try to increment (#439)

Okay sweet. I can see where the code is, so I'll do a pull request then?

— Reply to this email directly or view it on GitHubhttps://github.com/Code52/DownmarkerWPF/issues/439#issuecomment-63975038.

mirhagk commented 9 years ago

Do you want me to make it configurable or just always try to increment?

JakeGinnivan commented 9 years ago

Probably configuration, some people may like it

Sent from my Windows Phone


From: Nathan Jervismailto:notifications@github.com Sent: ý21/ý11/ý2014 16:36 To: Code52/DownmarkerWPFmailto:DownmarkerWPF@noreply.github.com Cc: Jake Ginnivanmailto:jake@ginnivan.net Subject: Re: [DownmarkerWPF] Lists should try to increment (#439)

Do you want me to make it configurable or just always try to increment?

— Reply to this email directly or view it on GitHubhttps://github.com/Code52/DownmarkerWPF/issues/439#issuecomment-63977758.

mirhagk commented 9 years ago

Okay, I'm working on getting it configurable now. I have 4 options currently, should all 4 of these be options?

  1. Increment - Always increment
  2. Repeat - Always repeat previous number
  3. Smart - Current behaviour (increment if it's 1
  4. None - Don't automatically continue lists

Also which should be the default?