@hyperbook/markdown 0.38.0 → 0.39.0

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.
@@ -4,7 +4,7 @@
4
4
  }
5
5
 
6
6
  .directive-alert>p {
7
- margin-bottom: 0;
7
+ margin-bottom: 10px;
8
8
  }
9
9
 
10
10
  .directive-alert {
@@ -34,6 +34,10 @@
34
34
  :first-child {
35
35
  margin-top: 0;
36
36
  }
37
+
38
+ :first-child.p {
39
+ margin-top: 10px;
40
+ }
37
41
  }
38
42
 
39
43
  .directive-alert.icon::before {
package/dist/index.js CHANGED
@@ -70556,6 +70556,12 @@ var remarkLink_default = (ctx) => () => {
70556
70556
  visit(tree, (node3, index2) => {
70557
70557
  if (typeof index2 === "number" && (node3.type === "link" || node3.type === "linkReference" || node3.type === "image" || node3.type === "imageReference" || node3.type === "definition")) {
70558
70558
  if (node3.url) {
70559
+ if (node3.type === "link" && /^https?:\/\//.test(node3.url)) {
70560
+ if (!node3.data) node3.data = {};
70561
+ if (!node3.data.hProperties) node3.data.hProperties = {};
70562
+ node3.data.hProperties.target = "_blank";
70563
+ node3.data.hProperties.rel = "noopener noreferrer";
70564
+ }
70559
70565
  node3.url = ctx.makeUrl(
70560
70566
  node3.url,
70561
70567
  "public",