mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-02-03 20:51:07 -05:00
Previously, the markdown editor would count instances of indentation text (ie. 4 spaces, tabs, and "> ") from anywhere in the line, rather than only counting those at the start of the line, so attempting to indent a line of text containing those strings in other locations could fail when it ought to be indented. This commit replaces the previous regex implementation with a function to count indents at the start of the line instead. Fixes #9339 ## Checklist The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org). ### Tests - I added test coverage for Go changes... - [ ] in their respective `*_test.go` for unit tests. - [ ] in the `tests/integration` directory if it involves interactions with a live Forgejo server. - I added test coverage for JavaScript changes... - [ ] in `web_src/js/*.test.js` if it can be unit tested. - [x] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)). ### Documentation - [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change. - [x] I did not document these changes and I do not expect someone else to do it. ### Release notes - [ ] I do not want this change to show in the release notes. - [x] I want the title to show in the release notes with a link to this pull request. - [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title. <!--start release-notes-assistant--> ## Release notes <!--URL:https://codeberg.org/forgejo/forgejo--> - User Interface bug fixes - [PR](https://codeberg.org/forgejo/forgejo/pulls/9403): <!--number 9403 --><!--line 0 --><!--description Zml4KHVpKTogaW1wcm92ZSBtYXJrZG93biBlZGl0b3IgaW5kZW50YXRpb24gY291bnRpbmc=-->fix(ui): improve markdown editor indentation counting<!--description--> <!--end release-notes-assistant--> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9403 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: Jordan Atwood <nightfirecat@nightfirec.at> Co-committed-by: Jordan Atwood <nightfirecat@nightfirec.at> |
||
|---|---|---|
| .. | ||
| admin | ||
| comp | ||
| autofocus-end.js | ||
| captcha.js | ||
| citation.js | ||
| clipboard.js | ||
| code-frequency.js | ||
| codeeditor.js | ||
| colorpicker.js | ||
| common-global.js | ||
| common-issue-list.js | ||
| common-issue-list.test.js | ||
| common-organization.js | ||
| contextpopup.js | ||
| contributors.js | ||
| copycontent.js | ||
| dashboard-repo-list.ts | ||
| dropzone.js | ||
| emoji.js | ||
| eventsource.sharedworker.js | ||
| file-fold.js | ||
| heatmap.js | ||
| imagediff.js | ||
| install.js | ||
| notification.js | ||
| org-team.js | ||
| pull-view-file.js | ||
| recent-commits.js | ||
| repo-action-view.ts | ||
| repo-activity-top-authors.ts | ||
| repo-branch-tag-selector.js | ||
| repo-branch.js | ||
| repo-code.test.ts | ||
| repo-code.ts | ||
| repo-commit.js | ||
| repo-common.js | ||
| repo-diff-commit.js | ||
| repo-diff-commitselect.js | ||
| repo-diff-filetree.js | ||
| repo-diff.js | ||
| repo-editor.js | ||
| repo-findfile.js | ||
| repo-findfile.test.js | ||
| repo-graph.js | ||
| repo-home.js | ||
| repo-issue-content.js | ||
| repo-issue-list.js | ||
| repo-issue-pr-form.js | ||
| repo-issue-pr-status.js | ||
| repo-issue.js | ||
| repo-issue.test.js | ||
| repo-legacy.js | ||
| repo-migrate.js | ||
| repo-migration.js | ||
| repo-milestone.js | ||
| repo-projects.js | ||
| repo-release.js | ||
| repo-search.js | ||
| repo-settings.js | ||
| repo-template.js | ||
| repo-unicode-escape.js | ||
| repo-wiki.js | ||
| scoped-access-token-selector.ts | ||
| sshkey-helper.js | ||
| stopwatch.js | ||
| tablesort.js | ||
| tribute.js | ||
| user-auth-webauthn.js | ||
| user-auth.js | ||