Skip to content

Commit 1a79eef

Browse files
author
Wes Cossick
committed
Hide trailing separators respects hidden icons
1 parent 6bda283 commit 1a79eef

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

debug/simplemde.debug.js

Lines changed: 4 additions & 2 deletions
Large diffs are not rendered by default.

debug/simplemde.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14540,7 +14540,9 @@ SimpleMDE.prototype.createToolbar = function(items) {
1454014540
var nonSeparatorIconsFollow = false;
1454114541

1454214542
for(var x = (i + 1); x < items.length; x++) {
14543-
if(items[x] !== "|") {
14543+
console.log(x);
14544+
if(items[x] !== "|" && (!self.options.hideIcons || self.options.hideIcons.indexOf(items[x].name) == -1)) {
14545+
console.log(items[x]);
1454414546
nonSeparatorIconsFollow = true;
1454514547
}
1454614548
}

dist/simplemde.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/simplemde.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1649,7 +1649,9 @@ SimpleMDE.prototype.createToolbar = function(items) {
16491649
var nonSeparatorIconsFollow = false;
16501650

16511651
for(var x = (i + 1); x < items.length; x++) {
1652-
if(items[x] !== "|") {
1652+
console.log(x);
1653+
if(items[x] !== "|" && (!self.options.hideIcons || self.options.hideIcons.indexOf(items[x].name) == -1)) {
1654+
console.log(items[x]);
16531655
nonSeparatorIconsFollow = true;
16541656
}
16551657
}

0 commit comments

Comments
 (0)