From eb561e6343678135a3ec3b86b578a68b5382c1cc Mon Sep 17 00:00:00 2001 From: David Sevilla Martin Date: Sat, 3 Aug 2019 09:14:06 -0400 Subject: [PATCH] Fix 'polyfills' incorrect spelling, add LICENSE text for startsWith polyfill --- extensions/markdown/js/src/forum/index.js | 2 +- .../markdown/js/src/forum/{pollyfills.js => polyfills.js} | 1 + extensions/markdown/js/src/forum/util/apply.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) rename extensions/markdown/js/src/forum/{pollyfills.js => polyfills.js} (90%) diff --git a/extensions/markdown/js/src/forum/index.js b/extensions/markdown/js/src/forum/index.js index 6f5f95c04..582b31538 100644 --- a/extensions/markdown/js/src/forum/index.js +++ b/extensions/markdown/js/src/forum/index.js @@ -2,7 +2,7 @@ import { extend } from 'flarum/extend'; import TextEditor from 'flarum/components/TextEditor'; import MarkdownArea from 'mdarea'; -import './pollyfills'; +import './polyfills'; import MarkdownToolbar from './components/MarkdownToolbar'; import MarkdownButton from './components/MarkdownButton'; diff --git a/extensions/markdown/js/src/forum/pollyfills.js b/extensions/markdown/js/src/forum/polyfills.js similarity index 90% rename from extensions/markdown/js/src/forum/pollyfills.js rename to extensions/markdown/js/src/forum/polyfills.js index 918827b58..1649bbcd0 100644 --- a/extensions/markdown/js/src/forum/pollyfills.js +++ b/extensions/markdown/js/src/forum/polyfills.js @@ -1,3 +1,4 @@ +/*! https://mths.be/startswith v0.2.0 by @mathias */ if (!String.prototype.startsWith) { Object.defineProperty(String.prototype, 'startsWith', { value: function(search, pos) { diff --git a/extensions/markdown/js/src/forum/util/apply.js b/extensions/markdown/js/src/forum/util/apply.js index 534463e2a..7f206060c 100644 --- a/extensions/markdown/js/src/forum/util/apply.js +++ b/extensions/markdown/js/src/forum/util/apply.js @@ -1,5 +1,5 @@ import insertText from './insertText'; -import {blockStyle, isMultipleLines, multilineStyle, orderedList} from "./styles"; +import { blockStyle, isMultipleLines, multilineStyle, orderedList } from './styles'; export const styleSelectedText = (textarea, styleArgs) => { const text = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);