rapier-markdown-kit 1.2.30 → 1.2.31
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# The conformance kit
|
|
2
2
|
|
|
3
3
|
Thirteen small documents, each covering one placement fact from [the Markdown
|
|
4
|
-
standard](https://
|
|
4
|
+
standard](https://github.com/jackskip22/rapier/blob/main/docs/markdown-standard.md): inline (no layout comment), width/x/align, `wrap=around`
|
|
5
5
|
with a real alpha silhouette, `wrap=box`, `behind`, `front`, `rotate=` on a plain raster, a foreign
|
|
6
6
|
SVG "drawing" already turned in its own bytes, a ring drawing whose unfilled interior takes a line of
|
|
7
7
|
text, both-sides wrapping around a centred picture, the neighbour search skipping a second, unrelated
|
package/dist/spec/md-assets.mjs
CHANGED
|
@@ -515,9 +515,10 @@ export function retireDeletedImageDefinitions(before, after, splices, factory) {
|
|
|
515
515
|
return retired.sort((a, b) => b.start - a.start).map(row => {
|
|
516
516
|
const gap = /(?:\r\n\r\n|\n\n|\r\r)$/.exec(after.slice(Math.max(0, row.start - 4), row.start));
|
|
517
517
|
let tail = after.slice(row.end);
|
|
518
|
+
const last = /^(?:\r\n|\n|\r)?$/.test(tail);
|
|
518
519
|
for (const other of retired) if (other.start >= row.end) tail = tail.replace(other.source, '');
|
|
519
520
|
const whole = gap && !/\S/.test(tail) && row.start - gap[0].length > markdownBodyOffset(after);
|
|
520
|
-
return whole ? {pos: row.start - gap[0].length, removed: gap[0] + row.source, inserted: ''} : {pos: row.start, removed: row.source, inserted: ''};
|
|
521
|
+
return whole ? {pos: row.start - gap[0].length, removed: gap[0] + row.source + (last ? after.slice(row.end) : ''), inserted: ''} : {pos: row.start, removed: row.source, inserted: ''};
|
|
521
522
|
});
|
|
522
523
|
} catch (_) { return []; }
|
|
523
524
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rapier-markdown-kit",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.31",
|
|
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",
|