We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 314ae02 commit 2fe2941Copy full SHA for 2fe2941
1 file changed
test/test.js
@@ -831,6 +831,18 @@ describe('markdown-toolbar-element', function () {
831
})
832
833
describe('header', function () {
834
+ it('sets the level correctly even when dynamically created', function () {
835
+ const headerElement = document.createElement('md-header')
836
+ headerElement.setAttribute('level', '2')
837
+ headerElement.textContent = 'h2'
838
+ const toolbar = document.querySelector('markdown-toolbar')
839
+ toolbar.appendChild(headerElement)
840
+
841
+ setVisualValue('|title|')
842
+ clickToolbar('md-header[level="2"]')
843
+ assert.equal('## |title|', visualValue())
844
+ })
845
846
it('inserts header syntax with cursor in description', function () {
847
setVisualValue('|title|')
848
clickToolbar('md-header')
0 commit comments