gitea/web_src/js/features
Giteabot 23d2d224c2
fix: prevent double markdown link brackets when pasting URL (#34745) (#34748)
Backport #34745 by MaxWebZ

When adding a link using the "Add a link" button in comment editor,
pasting a URL resulted in incorrect Markdown formatting (double
brackets) instead of replacing the placeholder text.

This fix adds a context check to prevent creating a new markdown link
when we're already inside an existing one.

Fixes #34740

Co-authored-by: MaxWebZ <5054326@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-06-17 16:21:08 +00:00
..
admin Optimize the calling code of queryElems (#34235) 2025-04-19 08:17:07 +08:00
comp fix: prevent double markdown link brackets when pasting URL (#34745) (#34748) 2025-06-17 16:21:08 +00:00
captcha.ts Fix mCaptcha bug (#33659) 2025-02-20 22:53:38 +08:00
citation.ts Enable Typescript `noImplicitAny` (#33322) 2025-01-22 15:11:51 +08:00
clipboard.ts Enable Typescript `strictFunctionTypes` (#32911) 2024-12-22 02:59:25 +08:00
code-frequency.ts Convert frontend code to typescript (#31559) 2024-07-07 15:32:30 +00:00
codeeditor.ts Improve JSX/TSX support in code editor (#32833) 2024-12-14 03:10:20 +00:00
colorpicker.ts Enable Typescript `strictFunctionTypes` (#32911) 2024-12-22 02:59:25 +08:00
common-button.test.ts Add a button editing action secret #34348 (#34462) 2025-05-16 15:26:21 +00:00
common-button.ts Add a button editing action secret #34348 (#34462) 2025-05-16 15:26:21 +00:00
common-fetch-action.ts Enable Typescript `noImplicitAny` (#33322) 2025-01-22 15:11:51 +08:00
common-form.ts Enable Typescript `noImplicitAny` (#33322) 2025-01-22 15:11:51 +08:00
common-issue-list.test.ts Convert frontend code to typescript (#31559) 2024-07-07 15:32:30 +00:00
common-issue-list.ts Fix remaining typescript issues, enable `tsc` (#32840) 2024-12-16 05:02:32 +08:00
common-organization.ts Optimize the calling code of queryElems (#34235) 2025-04-19 08:17:07 +08:00
common-page.ts Optimize the calling code of queryElems (#34235) 2025-04-19 08:17:07 +08:00
contextpopup.ts Enable Typescript `noImplicitAny` (#33322) 2025-01-22 15:11:51 +08:00
contributors.ts Add "n commits" link to contributors in contributors graph page (#32799) 2024-12-12 19:02:54 +00:00
copycontent.ts Update TypeScript types (#33799) 2025-03-05 08:03:44 -08:00
dashboard.ts Enable Typescript `noImplicitThis` (#33250) 2025-01-16 04:26:17 +08:00
dropzone.ts Enable Typescript `noImplicitAny` (#33322) 2025-01-22 15:11:51 +08:00
emoji.ts Enable Typescript `noImplicitAny` (#33322) 2025-01-22 15:11:51 +08:00
eventsource.sharedworker.ts Enable Typescript `strictFunctionTypes` (#32911) 2024-12-22 02:59:25 +08:00
file-fold.ts Mark parent directory as viewed when all files are viewed (#33958) 2025-04-15 22:35:22 +08:00
heatmap.ts Enable Typescript `noImplicitAny` (#33322) 2025-01-22 15:11:51 +08:00
imagediff.ts Drop fomantic build (#33845) 2025-03-11 12:44:52 +08:00
install.ts Enable Typescript `noImplicitAny` (#33322) 2025-01-22 15:11:51 +08:00
issue.ts Trivial fixes (#33304) 2025-01-17 08:55:02 +00:00
notification.ts Refactor legacy JS (#33115) 2025-01-06 17:38:42 +08:00
oauth2-settings.ts Enable Typescript `strictFunctionTypes` (#32911) 2024-12-22 02:59:25 +08:00
org-team.ts Enable Typescript `noImplicitAny` (#33322) 2025-01-22 15:11:51 +08:00
pull-view-file.ts Mark parent directory as viewed when all files are viewed (#33958) 2025-04-15 22:35:22 +08:00
recent-commits.ts Convert frontend code to typescript (#31559) 2024-07-07 15:32:30 +00:00
repo-actions.ts Grey out expired artifact on Artifacts list (#34314) (#34404) 2025-05-08 10:56:51 -07:00
repo-branch.ts Fix a number of typescript errors (#32773) 2024-12-11 09:29:04 +01:00
repo-code.ts Fix line-button issue after file selection in file tree (#34574) (#34576) 2025-06-01 23:20:21 -07:00
repo-commit.ts [Fix] Resolve the problem of commit_statuses not being loaded at the top - right when switching files from the file tree (#34079) 2025-03-31 18:39:08 +00:00
repo-common.test.ts Fix some migration and repo name problems (#33986) 2025-03-24 20:26:58 -07:00
repo-common.ts Fix some migration and repo name problems (#33986) 2025-03-24 20:26:58 -07:00
repo-diff-commit.ts Fix a number of typescript errors (#32773) 2024-12-11 09:29:04 +01:00
repo-diff-commitselect.ts Convert frontend code to typescript (#31559) 2024-07-07 15:32:30 +00:00
repo-diff-filetree.ts Use `git diff-tree` for `DiffFileTree` on diff pages (#33514) 2025-02-28 00:58:25 +00:00
repo-diff.ts Fix various Fomantic UI and htmx problems (#33851) 2025-03-11 11:35:05 -07:00
repo-editor.ts Refactor markup and pdf-viewer to use new init framework (#33772) 2025-03-03 11:49:15 -08:00
repo-findfile.test.ts Convert frontend code to typescript (#31559) 2024-07-07 15:32:30 +00:00
repo-findfile.ts Enable Typescript `noImplicitAny` (#33322) 2025-01-22 15:11:51 +08:00
repo-graph.ts Fix dynamic content loading init problem (#33748) 2025-03-01 02:02:10 +00:00
repo-home.ts Enable Typescript `noImplicitAny` (#33322) 2025-01-22 15:11:51 +08:00
repo-issue-content.ts Enable Typescript `noImplicitAny` (#33322) 2025-01-22 15:11:51 +08:00
repo-issue-edit.ts Fix: quoted replies incorrectly render user input as part of the quote (#34216) 2025-04-16 14:32:58 +08:00
repo-issue-list.ts Fix various trivial frontend problems (#34263) 2025-04-24 09:11:54 +08:00
repo-issue-pull.ts Option to delay conflict checking of old pull requests until page view (#27779) 2025-04-24 19:26:57 +00:00
repo-issue-sidebar-combolist.ts Fix some dropdown problems on the issue sidebar (#34308) (#34327) 2025-05-01 09:24:18 -07:00
repo-issue-sidebar.md Fix issue sidebar dropdown keyboard support (#33447) 2025-01-30 22:54:50 +00:00
repo-issue-sidebar.ts Fix some dropdown problems on the issue sidebar (#34308) (#34327) 2025-05-01 09:24:18 -07:00
repo-issue.ts Option to delay conflict checking of old pull requests until page view (#27779) 2025-04-24 19:26:57 +00:00
repo-legacy.ts Option to delay conflict checking of old pull requests until page view (#27779) 2025-04-24 19:26:57 +00:00
repo-migrate.ts Enable Typescript `noImplicitAny` (#33322) 2025-01-22 15:11:51 +08:00
repo-migration.ts Fix some migration and repo name problems (#33986) 2025-03-24 20:26:58 -07:00
repo-milestone.ts Fix milestone deadline and date related problems (#32339) 2024-11-05 07:46:40 +00:00
repo-new.ts fix org repo creation being limited by user limits (#34030) 2025-03-27 13:16:17 +00:00
repo-projects.ts Add fullscreen mode as a more efficient operation way to view projects (#34081) 2025-04-23 13:42:22 +08:00
repo-release.ts Enable Typescript `strictFunctionTypes` (#32911) 2024-12-22 02:59:25 +08:00
repo-search.ts Enable Typescript `strictFunctionTypes` (#32911) 2024-12-22 02:59:25 +08:00
repo-settings-branches.test.ts Refactor repo-projects.ts (#32892) 2024-12-19 08:37:12 +00:00
repo-settings-branches.ts Allow cropping an avatar before setting it (#32565) 2024-11-28 02:15:59 +00:00
repo-settings.ts Optimize the calling code of queryElems (#34235) 2025-04-19 08:17:07 +08:00
repo-unicode-escape.ts Fix "unicode escape" JS error (#32806) 2024-12-12 18:37:44 +00:00
repo-view-file-tree.ts Add file tree to file view page (#32721) 2025-03-15 16:26:49 +08:00
repo-wiki.ts Refactor markup and pdf-viewer to use new init framework (#33772) 2025-03-03 11:49:15 -08:00
sshkey-helper.ts Enable Typescript `noImplicitThis` (#33250) 2025-01-16 04:26:17 +08:00
stopwatch.ts Enable Typescript `noImplicitAny` (#33322) 2025-01-22 15:11:51 +08:00
tablesort.ts Enable Typescript `noImplicitAny` (#33322) 2025-01-22 15:11:51 +08:00
tribute.ts Fix various trivial frontend problems (#34263) 2025-04-24 09:11:54 +08:00
user-auth-webauthn.ts Simplify secure context check (#33906) 2025-03-16 19:05:26 +08:00
user-auth.ts Warn users when they try to use a non-root-url to sign in/up (#32272) 2024-10-17 10:28:51 +08:00
user-settings.ts Optimize the calling code of queryElems (#34235) 2025-04-19 08:17:07 +08:00