rapier-markdown-kit 1.2.13 → 1.2.16
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.
|
@@ -928,13 +928,13 @@ function* _rapierMarkFigureCaptionsSteps(root) {
|
|
|
928
928
|
}
|
|
929
929
|
}
|
|
930
930
|
|
|
931
|
-
function _rapierMarkListContinuations(blocks) { return finish(_rapierMarkListContinuationsSteps(blocks)); }
|
|
931
|
+
function _rapierMarkListContinuations(blocks, mark) { return finish(_rapierMarkListContinuationsSteps(blocks, mark)); }
|
|
932
932
|
|
|
933
933
|
function* _rapierChildElements(root) {
|
|
934
934
|
for (let child = root.firstElementChild; child; child = child.nextElementSibling) yield child;
|
|
935
935
|
}
|
|
936
936
|
|
|
937
|
-
function* _rapierMarkListContinuationsSteps(blocks) {
|
|
937
|
+
function* _rapierMarkListContinuationsSteps(blocks, mark = (element, name) => element.setAttribute(name, '')) {
|
|
938
938
|
const isHeading = element => !!element && /^H[1-6]$/.test(element.tagName);
|
|
939
939
|
let previous = null, headings = [], last = 0;
|
|
940
940
|
for (const element of blocks) { yield;
|
|
@@ -942,8 +942,8 @@ function* _rapierMarkListContinuationsSteps(blocks) {
|
|
|
942
942
|
if (!element || element.tagName !== 'OL') {previous = null; headings = []; continue;}
|
|
943
943
|
const start = parseInt(element.getAttribute('start'), 10);
|
|
944
944
|
if (previous && headings.length && start === last + 1) {
|
|
945
|
-
previous
|
|
946
|
-
for (const heading of headings) { yield;heading
|
|
945
|
+
mark(previous, 'data-rapier-list-continues');
|
|
946
|
+
for (const heading of headings) { yield;mark(heading, 'data-rapier-list-through');}
|
|
947
947
|
}
|
|
948
948
|
previous = element; headings = [];
|
|
949
949
|
last = (Number.isFinite(start) ? start : 1) + element.querySelectorAll(':scope > li').length - 1;
|
|
@@ -302,7 +302,9 @@ export function createTypography() {
|
|
|
302
302
|
!['static','relative'].includes(s.position) || element !== paragraph && element.tagName !== 'BR' && s.display !== 'inline' ||
|
|
303
303
|
!['none','normal'].includes(before) || !['none','normal'].includes(after)) supported = false;
|
|
304
304
|
}
|
|
305
|
-
|
|
305
|
+
const sourceStyle = value => value == null ? null : value.split(';').map(part => part.trim())
|
|
306
|
+
.filter(part => part && !properties.some(name => part.startsWith(name + ':'))).join(';');
|
|
307
|
+
keys.push(...attributes.map(name => name === 'style' ? sourceStyle(paragraph.getAttribute(name)) : paragraph.getAttribute(name)));
|
|
306
308
|
return {key: keys.join('\u0000'), generation:keys[0], styles, parents, supported};
|
|
307
309
|
}
|
|
308
310
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rapier-markdown-kit",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.16",
|
|
4
4
|
"description": "Read, render and write Self-contained Markdown: one .md file that carries its pictures, drawings and layout, and that any Markdown app can read. HTML renderer, stylesheet, text layout, Will/1 agent permissions, and an edit history with authorship and offline merge. MIT, no dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"markdown",
|