File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ const buttonSelectors = [
18
18
function getButtons ( toolbar : Element ) : Element [ ] {
19
19
const els = [ ]
20
20
for ( const button of toolbar . querySelectorAll ( buttonSelectors . join ( ', ' ) ) ) {
21
- if ( button . closest ( 'markdown-toolbar' ) === toolbar ) els . push ( button )
21
+ if ( button . closest ( 'markdown-toolbar' ) === toolbar && ! button . hidden ) els . push ( button )
22
22
}
23
23
return els
24
24
}
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ describe('markdown-toolbar-element', function() {
71
71
<md-bold>bold</md-bold>
72
72
<md-header>header</md-header>
73
73
<md-header level="1">h1</md-header>
74
+ <md-header level="5" hidden>h1</md-header>
74
75
<md-header level="10">h1</md-header>
75
76
<div data-md-button>Other button</div>
76
77
<md-italic>italic</md-italic>
You can’t perform that action at this time.
0 commit comments