Skip to content

Commit b9148f9

Browse files
authored
Merge pull request #47 from github/quote-hotkey-shift
Require pressing shift for the quote hotkey
2 parents 045a363 + a5624f1 commit b9148f9

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ class MarkdownQuoteButtonElement extends MarkdownButtonElement {
173173
connectedCallback() {
174174
super.connectedCallback()
175175
this.setAttribute('hotkey', '.')
176+
this.setAttribute('hotkey-requires-shift', 'true')
176177
}
177178
}
178179

test/test.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,10 +468,12 @@ describe('markdown-toolbar-element', function () {
468468
assert.equal('> |', visualValue())
469469
})
470470

471-
it('inserts selected quoted sample via hotkey', function () {
471+
it('inserts selected quoted sample via hotkey, requiring shift', function () {
472472
focus()
473473
setVisualValue('')
474-
pressHotkey('.')
474+
pressHotkey('.', false)
475+
assert.equal('|', visualValue())
476+
pressHotkey('.', true)
475477
assert.equal('> |', visualValue())
476478
})
477479

0 commit comments

Comments
 (0)