@khanacademy/simple-markdown 0.13.5 → 0.13.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/index.js +6 -3
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -6,10 +6,10 @@ var perseusCore = require('@khanacademy/perseus-core');
|
|
|
6
6
|
|
|
7
7
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
8
8
|
const libName = "@khanacademy/simple-markdown";
|
|
9
|
-
const libVersion = "0.13.
|
|
9
|
+
const libVersion = "0.13.7";
|
|
10
10
|
perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
11
11
|
|
|
12
|
-
/* eslint-disable prefer-spread, no-regex-spaces,
|
|
12
|
+
/* eslint-disable prefer-spread, no-regex-spaces, guard-for-in, no-console, no-var */
|
|
13
13
|
|
|
14
14
|
// Type Definitions:
|
|
15
15
|
|
|
@@ -295,7 +295,7 @@ var sanitizeUrl = function (url) {
|
|
|
295
295
|
if (prot.indexOf("javascript:") === 0 || prot.indexOf("vbscript:") === 0 || prot.indexOf("data:") === 0) {
|
|
296
296
|
return null;
|
|
297
297
|
}
|
|
298
|
-
} catch
|
|
298
|
+
} catch {
|
|
299
299
|
// invalid URLs should throw a TypeError
|
|
300
300
|
// see for instance: `new URL("");`
|
|
301
301
|
return null;
|
|
@@ -378,6 +378,9 @@ var LIST_R = new RegExp("^( *)(" + LIST_BULLET + ") " + "[\\s\\S]+?(?:\n{2,}(?!
|
|
|
378
378
|
"|\\s*\n*$)");
|
|
379
379
|
var LIST_LOOKBEHIND_R = /(?:^|\n)( *)$/;
|
|
380
380
|
var TABLES = function () {
|
|
381
|
+
// predefine regexes so we don't have to create them inside functions
|
|
382
|
+
// sure, regex literals should be fast, even inside functions, but they
|
|
383
|
+
// aren't in all browsers.
|
|
381
384
|
var TABLE_ROW_SEPARATOR_TRIM = /^ *\| *| *\| *$/g;
|
|
382
385
|
var TABLE_CELL_END_TRIM = / *$/;
|
|
383
386
|
var TABLE_RIGHT_ALIGN = /^ *-+: *$/;
|