rapier-markdown-kit 1.1.10 → 1.1.14

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.
@@ -83,7 +83,14 @@ export function imageStyle(value) {
83
83
  return parts.join(';');
84
84
  }
85
85
 
86
- // The one wrap-owner rule (layout/browser.js, layout/interchange.js, editor/share.js): prose after, else before, skipping pictures,
86
+ // Controls remain real DOM nodes while their surrounding text flows. A checkbox, link or
87
+ // disclosure is not a reason to exclude its entire block from picture placement.
88
+ export function wrapTextBlock(element) {
89
+ return element && /^(P|H[1-6]|UL|OL|BLOCKQUOTE|DETAILS|DL)$/.test(element.tagName) &&
90
+ element.textContent.trim() && !element.querySelector('img,table,pre,figure,math,.math-rendered') ? element : null;
91
+ }
92
+
93
+ // The one wrap-owner rule (layout/browser.js, layout/interchange.js, editor/share.js): text after, else before, skipping pictures,
87
94
  // metadata and empty paragraphs; any other block is a barrier in that direction.
88
95
  export function wrapNeighbour(node, classify) {
89
96
  for (const step of [n => n && n.nextElementSibling, n => n && n.previousElementSibling]) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rapier-markdown-kit",
3
- "version": "1.1.10",
3
+ "version": "1.1.14",
4
4
  "description": "Read, write and style Self-contained Markdown: the universal stylesheet, picture layout, text marks, picture appendix, line planner and Will/1 markers. MIT, no dependencies.",
5
5
  "author": "Jack Skipworth",
6
6
  "license": "MIT",
package/style.css CHANGED
@@ -353,7 +353,7 @@
353
353
  line-height:var(--md-leading-tight);color:var(--md-heading-color);text-wrap:balance}
354
354
  .md-render h1{font-size:2.8rem;font-weight:700;
355
355
  margin:var(--md-space-6) 0 var(--md-space-4);
356
- padding-bottom:var(--md-space-3);border-bottom:1px solid var(--md-color-border)}
356
+ padding-bottom:var(--md-space-3)}
357
357
  .md-render h2{font-size:2.2rem;font-weight:600;margin:var(--md-space-6) 0 var(--md-space-3)}
358
358
  .md-render h3{font-size:1.7rem;font-weight:600;margin:var(--md-space-5) 0 var(--md-space-2)}
359
359
  .md-render h4{font-size:1.3rem;font-weight:500;margin:var(--md-space-4) 0 var(--md-space-2)}