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

List Edit Mode for Markdown #894

Merged
merged 8 commits into from
Apr 20, 2021
Merged

Conversation

igordsm
Copy link
Sponsor Contributor

@igordsm igordsm commented Oct 11, 2020

Adds new items automatically when editing lists in Markdown. See below.

list-mode

It has some limitations, though.

  1. if an item is added in an ordered list, only the items after it are renumbered.
  2. there is no support for splitting/merging ordered lists

I am far from being an expert in TextBuffer and TextIter, but I am willing to work on top of this to get it in good shape.

This was created on top of #890 , so that PR should be considered first. When/if it is merged I can rebase this one so that only new commits are present.

@hanaral
Copy link

hanaral commented Oct 23, 2020

Great work!

@igordsm
Copy link
Sponsor Contributor Author

igordsm commented Dec 18, 2020

Now that #890 has been accepted, this can be reviewed. I have already done a rebase and only the correct commits are present in this PR. Works as shown in the GIF above. Some thoughts about the current implementation:

  • unordered lists work quite well.
  • ordered lists are a bit more tricky. I did some work to fix numbering when adding items in the middle of a list, but splitting lists and deleting items do not recount. I am not sure if this is a big deal, but it is worth noting.
  • github's editor does not do number recounting on ordered lists. The rendered simply ignores all numbers but the first one.

Anyways, this is ready for a round of review for both code and functionality.

Copy link
Member

@danirabbit danirabbit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected! Thanks for working on this. Sorry for taking a while to review 😅

@danirabbit danirabbit merged commit a56ff7f into elementary:master Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants