Commit ecdc1bbd authored by Denys Mishunov's avatar Denys Mishunov

Merge branch...

Merge branch '225274-follow-up-from-surround-selected-text-with-typed-backtick-or-single-quote-in-markdown-fields' into 'master'

Change markdown italic toolbar button to use `_` instead of `*`

Closes #225274

See merge request gitlab-org/gitlab!41010
parents 53a3e898 f8d98240
...@@ -129,7 +129,7 @@ export default { ...@@ -129,7 +129,7 @@ export default {
<li :class="{ active: !previewMarkdown }" class="md-header-toolbar"> <li :class="{ active: !previewMarkdown }" class="md-header-toolbar">
<div class="d-inline-block"> <div class="d-inline-block">
<toolbar-button tag="**" :button-title="__('Add bold text')" icon="bold" /> <toolbar-button tag="**" :button-title="__('Add bold text')" icon="bold" />
<toolbar-button tag="*" :button-title="__('Add italic text')" icon="italic" /> <toolbar-button tag="_" :button-title="__('Add italic text')" icon="italic" />
<toolbar-button <toolbar-button
:prepend="true" :prepend="true"
:tag="tag" :tag="tag"
......
.md-header-toolbar.active .md-header-toolbar.active
= markdown_toolbar_button({ icon: "bold", data: { "md-tag" => "**" }, title: _("Add bold text") }) = markdown_toolbar_button({ icon: "bold", data: { "md-tag" => "**" }, title: _("Add bold text") })
= markdown_toolbar_button({ icon: "italic", data: { "md-tag" => "*" }, title: _("Add italic text") }) = markdown_toolbar_button({ icon: "italic", data: { "md-tag" => "_" }, title: _("Add italic text") })
= markdown_toolbar_button({ icon: "quote", data: { "md-tag" => "> ", "md-prepend" => true }, title: _("Insert a quote") }) = markdown_toolbar_button({ icon: "quote", data: { "md-tag" => "> ", "md-prepend" => true }, title: _("Insert a quote") })
= markdown_toolbar_button({ icon: "code", data: { "md-tag" => "`", "md-block" => "```" }, title: _("Insert code") }) = markdown_toolbar_button({ icon: "code", data: { "md-tag" => "`", "md-block" => "```" }, title: _("Insert code") })
= markdown_toolbar_button({ icon: "link", data: { "md-tag" => "[{text}](url)", "md-select" => "url" }, title: _("Add a link") }) = markdown_toolbar_button({ icon: "link", data: { "md-tag" => "[{text}](url)", "md-select" => "url" }, title: _("Add a link") })
......
...@@ -36,6 +36,6 @@ RSpec.describe 'Issue markdown toolbar', :js do ...@@ -36,6 +36,6 @@ RSpec.describe 'Issue markdown toolbar', :js do
all('.toolbar-btn')[1].click all('.toolbar-btn')[1].click
expect(find('#note-body')[:value]).to eq("test\n*underline*\n") expect(find('#note-body')[:value]).to eq("test\n_underline_\n")
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment