@khanacademy/simple-markdown 0.10.4 → 0.11.1
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/CHANGELOG.md +17 -0
- package/dist/es/index.js +4 -1
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -6
- package/tsconfig-build.tsbuildinfo +1 -1
package/dist/index.js
CHANGED
|
@@ -6,13 +6,16 @@ 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.
|
|
9
|
+
const libVersion = "0.11.1";
|
|
10
10
|
perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
11
11
|
|
|
12
12
|
/* eslint-disable prefer-spread, no-regex-spaces, @typescript-eslint/no-unused-vars, guard-for-in, no-console, no-var */
|
|
13
13
|
|
|
14
14
|
// Type Definitions:
|
|
15
15
|
|
|
16
|
+
// We want to clarify our defaultRules types a little bit more so clients can
|
|
17
|
+
// reuse defaultRules built-ins. So we make some stronger guarantess when
|
|
18
|
+
// we can:
|
|
16
19
|
// End TypeScript Definitions
|
|
17
20
|
|
|
18
21
|
var CR_NEWLINE_R = /\r\n?/g;
|
|
@@ -170,7 +173,7 @@ var parserFor = function (rules, defaultState) {
|
|
|
170
173
|
Array.prototype.push.apply(result, parsed);
|
|
171
174
|
} else {
|
|
172
175
|
if (parsed == null || typeof parsed !== "object") {
|
|
173
|
-
throw new Error(
|
|
176
|
+
throw new Error(`parse() function returned invalid parse result: '${parsed}'`);
|
|
174
177
|
}
|
|
175
178
|
|
|
176
179
|
// We also let rules override the default type of
|