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 = [
1818function getButtons ( toolbar : Element ) : Element [ ] {
1919 const els = [ ]
2020 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 )
2222 }
2323 return els
2424}
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ describe('markdown-toolbar-element', function() {
7171 <md-bold>bold</md-bold>
7272 <md-header>header</md-header>
7373 <md-header level="1">h1</md-header>
74+ <md-header level="5" hidden>h1</md-header>
7475 <md-header level="10">h1</md-header>
7576 <div data-md-button>Other button</div>
7677 <md-italic>italic</md-italic>
You can’t perform that action at this time.
0 commit comments