diff --git a/src/js/easymde.js b/src/js/easymde.js index 509e4e9..1c44517 100644 --- a/src/js/easymde.js +++ b/src/js/easymde.js @@ -145,8 +145,8 @@ function createToolbarButton(options, enableTooltips, shortcuts) { for (var classNameIndex = 0; classNameIndex < classNameParts.length; classNameIndex++) { var classNamePart = classNameParts[classNameIndex]; // Split icon classes from the button. - // Regex will detect "fa" and "fa-something", but not "fanfare". - if (classNamePart.match(/^fa((-.*)|$)/)) { + // Regex will detect "fa", "fas", "fa-something" and "fa-some-icon-1", but not "fanfare". + if (classNamePart.match(/^fa([srlb]|(-[\w-]*)|$)/)) { iconClasses.push(classNamePart); } else { el.classList.add(classNamePart);