diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml index 8a4ea690c60..79f3ddff3ec 100644 --- a/.gitlab/ci/rails.gitlab-ci.yml +++ b/.gitlab/ci/rails.gitlab-ci.yml @@ -25,7 +25,8 @@ .decomposed-database-rspec: extends: .decomposed-database variables: - GITLAB_LOAD_BALANCING_REUSE_PRIMARY_ci: "main" + # For decomposition phase 3, uncomment line below: + # GITLAB_LOAD_BALANCING_REUSE_PRIMARY_ci: "main" GITLAB_USE_MODEL_LOAD_BALANCING: "true" .rspec-base: diff --git a/app/assets/javascripts/behaviors/shortcuts/keybindings.js b/app/assets/javascripts/behaviors/shortcuts/keybindings.js index b27dccabdf8..23b66405844 100644 --- a/app/assets/javascripts/behaviors/shortcuts/keybindings.js +++ b/app/assets/javascripts/behaviors/shortcuts/keybindings.js @@ -131,6 +131,13 @@ export const ITALIC_TEXT = { customizable: false, }; +export const STRIKETHROUGH_TEXT = { + id: 'editing.strikethroughText', + description: __('Strikethrough text'), + defaultKeys: ['mod+shift+x'], + customizable: false, +}; + export const LINK_TEXT = { id: 'editing.linkText', description: __('Link text'), @@ -511,7 +518,14 @@ export const GLOBAL_SHORTCUTS_GROUP = { export const EDITING_SHORTCUTS_GROUP = { id: 'editing', name: __('Editing'), - keybindings: [BOLD_TEXT, ITALIC_TEXT, LINK_TEXT, TOGGLE_MARKDOWN_PREVIEW, EDIT_RECENT_COMMENT], + keybindings: [ + BOLD_TEXT, + ITALIC_TEXT, + STRIKETHROUGH_TEXT, + LINK_TEXT, + TOGGLE_MARKDOWN_PREVIEW, + EDIT_RECENT_COMMENT, + ], }; export const WIKI_SHORTCUTS_GROUP = { diff --git a/app/assets/javascripts/gfm_auto_complete.js b/app/assets/javascripts/gfm_auto_complete.js index bf29a356abd..7282a92a847 100644 --- a/app/assets/javascripts/gfm_auto_complete.js +++ b/app/assets/javascripts/gfm_auto_complete.js @@ -574,6 +574,10 @@ class GfmAutoComplete { // Do not match if there is no `~` before the cursor return null; } + if (subtext.endsWith('~~')) { + // Do not match if there are two consecutive `~` characters (strikethrough) before the cursor + return null; + } const lastCandidate = subtext.split(flag).pop(); if (labels.find((label) => label.title.startsWith(lastCandidate))) { return lastCandidate; diff --git a/app/assets/javascripts/vue_shared/components/markdown/header.vue b/app/assets/javascripts/vue_shared/components/markdown/header.vue index 21794f7f122..13189670e17 100644 --- a/app/assets/javascripts/vue_shared/components/markdown/header.vue +++ b/app/assets/javascripts/vue_shared/components/markdown/header.vue @@ -1,7 +1,13 @@