@khanacademy/perseus 0.2.6 → 0.2.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/CHANGELOG.md +8 -0
- package/dist/es/index.js +11 -6
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +11 -6
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/jipt-paragraphs_test.js +34 -0
- package/src/jipt-paragraphs.js +16 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @khanacademy/perseus
|
|
2
2
|
|
|
3
|
+
## 0.2.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3921a385: Fix bug where JIPT integration parsing rules returned incorrect type
|
|
8
|
+
- Updated dependencies [3921a385]
|
|
9
|
+
- @khanacademy/simple-markdown@0.8.3
|
|
10
|
+
|
|
3
11
|
## 0.2.6
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/es/index.js
CHANGED
|
@@ -20868,17 +20868,20 @@ var arrayRules = {
|
|
|
20868
20868
|
fence: {
|
|
20869
20869
|
match: SimpleMarkdown.defaultRules.fence.match,
|
|
20870
20870
|
order: 1,
|
|
20871
|
-
|
|
20872
|
-
|
|
20871
|
+
parse: (capture, state, _parse) => ({
|
|
20872
|
+
type: "codeBlock",
|
|
20873
|
+
lang: capture[2] || undefined,
|
|
20874
|
+
content: capture[3]
|
|
20875
|
+
})
|
|
20873
20876
|
},
|
|
20874
20877
|
paragraph: {
|
|
20875
20878
|
match: SimpleMarkdown.defaultRules.paragraph.match,
|
|
20876
20879
|
order: 2,
|
|
20877
|
-
|
|
20878
|
-
|
|
20880
|
+
parse: (capture, state, _parse2) => ({
|
|
20881
|
+
content: capture[1]
|
|
20882
|
+
})
|
|
20879
20883
|
}
|
|
20880
|
-
};
|
|
20881
|
-
|
|
20884
|
+
};
|
|
20882
20885
|
var builtArrayParser = SimpleMarkdown.parserFor(arrayRules); // This should just return an array of strings! magick!
|
|
20883
20886
|
|
|
20884
20887
|
var parseToArray = source => {
|
|
@@ -20889,6 +20892,8 @@ var parseToArray = source => {
|
|
|
20889
20892
|
var paragraphedSource = source.replace(/^\n\s*\n/, "") + "\n\n";
|
|
20890
20893
|
return builtArrayParser(paragraphedSource, {
|
|
20891
20894
|
inline: false
|
|
20895
|
+
}).map(c => {
|
|
20896
|
+
return c["content"];
|
|
20892
20897
|
});
|
|
20893
20898
|
};
|
|
20894
20899
|
|