@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/es/index.js
CHANGED
|
@@ -2,10 +2,10 @@ import { addLibraryVersionToPerseusDebug } from '@khanacademy/perseus-core';
|
|
|
2
2
|
|
|
3
3
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
4
4
|
const libName = "@khanacademy/simple-markdown";
|
|
5
|
-
const libVersion = "0.13.
|
|
5
|
+
const libVersion = "0.13.7";
|
|
6
6
|
addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
7
7
|
|
|
8
|
-
/* eslint-disable prefer-spread, no-regex-spaces,
|
|
8
|
+
/* eslint-disable prefer-spread, no-regex-spaces, guard-for-in, no-console, no-var */
|
|
9
9
|
|
|
10
10
|
// Type Definitions:
|
|
11
11
|
|
|
@@ -291,7 +291,7 @@ var sanitizeUrl = function sanitizeUrl(url) {
|
|
|
291
291
|
if (prot.indexOf("javascript:") === 0 || prot.indexOf("vbscript:") === 0 || prot.indexOf("data:") === 0) {
|
|
292
292
|
return null;
|
|
293
293
|
}
|
|
294
|
-
} catch (
|
|
294
|
+
} catch (_unused) {
|
|
295
295
|
// invalid URLs should throw a TypeError
|
|
296
296
|
// see for instance: `new URL("");`
|
|
297
297
|
return null;
|
|
@@ -374,6 +374,9 @@ var LIST_R = new RegExp("^( *)(" + LIST_BULLET + ") " + "[\\s\\S]+?(?:\n{2,}(?!
|
|
|
374
374
|
"|\\s*\n*$)");
|
|
375
375
|
var LIST_LOOKBEHIND_R = /(?:^|\n)( *)$/;
|
|
376
376
|
var TABLES = function () {
|
|
377
|
+
// predefine regexes so we don't have to create them inside functions
|
|
378
|
+
// sure, regex literals should be fast, even inside functions, but they
|
|
379
|
+
// aren't in all browsers.
|
|
377
380
|
var TABLE_ROW_SEPARATOR_TRIM = /^ *\| *| *\| *$/g;
|
|
378
381
|
var TABLE_CELL_END_TRIM = / *$/;
|
|
379
382
|
var TABLE_RIGHT_ALIGN = /^ *-+: *$/;
|