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

Fix toggling of the numbered list prefix in Markdown tiddlers #6697

Conversation

MaxGyver83
Copy link
Contributor

@MaxGyver83 MaxGyver83 commented May 16, 2022

Whenever you use a button/shortcut that calls the function prefix-lines.js, the line prefix is added when there was none or it's removed when it was already there. (Examples: bulleted list, numbered list, heading).

The only exception is numbered lists in Markdown tiddlers. When you press the according button multiple times, the prefixes add up:

1. 1. 1. item

The reason is that the prefix-lines function expects the prefix parameter to be a single character (which is true for all prefixes except for the Markdown numbered list prefix). This pull request makes prefix-lines work for multi-character prefixes, too.

@Jermolene
Copy link
Member

Thanks @MaxGyver83 a minor comment

@Jermolene
Copy link
Member

Thanks @MaxGyver83 there's a simple conflict which I would normally resolve as part of merging, but today I'm using GitHub's web interface, and so I think it might be safer if you could do it. Many thanks.

@MaxGyver83 MaxGyver83 force-pushed the bugfix/markdown-toggle-numbered-list-item branch from 227be79 to c1888f8 Compare May 17, 2022 20:26
@MaxGyver83
Copy link
Contributor Author

Thanks @MaxGyver83 there's a simple conflict which I would normally resolve as part of merging, but today I'm using GitHub's web interface, and so I think it might be safer if you could do it. Many thanks.

No problem. This was caused by my other pull request. I have rebased this branch onto master.

@Jermolene Jermolene merged commit 7cbe1e1 into TiddlyWiki:master May 17, 2022
@Jermolene
Copy link
Member

Thanks @MaxGyver83

@MaxGyver83 MaxGyver83 deleted the bugfix/markdown-toggle-numbered-list-item branch May 17, 2022 20:34
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.

2 participants