Conversation
| // start a new line with the same indention and prefix | ||
| let newPrefix = prefix; | ||
| // a simple approach, otherwise it needs to parse the lines after the current line | ||
| if (/^\d+\./.test(prefix)) newPrefix = `1. ${newPrefix.slice(newPrefix.indexOf('.') + 2)}`; |
There was a problem hiding this comment.
not sure what old code does
got it
There was a problem hiding this comment.
Comment above // a simple approach, otherwise it needs to parse the lines after the current line
|
I guess it's not right for this case: Your result might be ? I didn't do that (auto-increase) because it needs a complex algorithm to make it right. And for most cases only using I added a new test: |
|
@wxiaoguang should i revert the increase number code or try to implement increasing numbers below? |
Either is fine, but there are many edge cases, even GitHub doesn't get it completely right, and it would be quite complex, maybe at least hundreds lines of code in my mind. So at the moment, I would prefer to revert "the increase number" |
|
@wxiaoguang done |
- Fix cursor position if input newline on middle of lines - ~Increment number if numbered list~  --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* giteaofficial/main: demilestone should not include milestone (go-gitea#32923) fix textarea newline handle (go-gitea#32966) Fix Azure blob object `Seek` (go-gitea#32974) Fix maven pom inheritance (go-gitea#32943) Refactor arch route handlers (go-gitea#32972) [skip ci] Updated translations via Crowdin Refactor tmpl and blob_excerpt (go-gitea#32967) Clarify path param naming (go-gitea#32969) Refactor getpatch/getdiff functions and remove unnecessary fallback (go-gitea#32817) Refactor request context (go-gitea#32956)
I have made a complete fix : Fix editor markdown not incrementing in a numbered list #33187 |
Increment number if numbered list