Skip to content

Commit

Permalink
Merge pull request #38 from github/td/lowercase-code-block-hotkey
Browse files Browse the repository at this point in the history
Change code block hotkey from E -> e
  • Loading branch information
keithamus committed Mar 23, 2021
2 parents e9a2547 + f34eb14 commit 40b95c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class MarkdownCodeButtonElement extends MarkdownButtonElement {

connectedCallback() {
super.connectedCallback()
this.setAttribute('hotkey', 'E')
this.setAttribute('hotkey', 'e')
}
}

Expand Down
9 changes: 1 addition & 8 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,6 @@ describe('markdown-toolbar-element', function () {
pressHotkey('B') // capital `B` instead of lowercase `b`
assert.equal('The |quick| brown fox jumps over the lazy dog', visualValue())
})

it('does not codeblock selected text when using the lowercased hotkey', function () {
focus()
setVisualValue('The |quick| brown fox jumps over the lazy dog')
pressHotkey('e') // lowercase `e` instead of uppercase `E`
assert.equal('The |quick| brown fox jumps over the lazy dog', visualValue())
})
})

describe('bold', function () {
Expand Down Expand Up @@ -629,7 +622,7 @@ describe('markdown-toolbar-element', function () {
it('surrounds a line with backticks via hotkey', function () {
focus()
setVisualValue("|puts 'Hello, world!'|")
pressHotkey('E')
pressHotkey('e')
assert.equal("`|puts 'Hello, world!'|`", visualValue())
})

Expand Down

0 comments on commit 40b95c5

Please sign in to comment.