@dskripchenko/markdown-editor 0.2.0 → 0.2.1

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - dc2c5a0: `image-base` without a scheme (`/media/`): pictures shown from it are saved back relative as well.
8
+
3
9
  ## 0.2.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -128,11 +128,12 @@ function escapeHtml(text) {
128
128
  * Anything else stays as it is.
129
129
  */
130
130
  function relativeTo(url, base) {
131
+ const PLACEHOLDER = "http://base.invalid/";
131
132
  let u;
132
133
  let b;
133
134
  try {
134
- u = new URL(url);
135
- b = new URL(base);
135
+ b = new URL(base, PLACEHOLDER);
136
+ u = new URL(url, b);
136
137
  } catch {
137
138
  return url;
138
139
  }
package/dist/index.mjs CHANGED
@@ -127,11 +127,12 @@ function escapeHtml(text) {
127
127
  * Anything else stays as it is.
128
128
  */
129
129
  function relativeTo(url, base) {
130
+ const PLACEHOLDER = "http://base.invalid/";
130
131
  let u;
131
132
  let b;
132
133
  try {
133
- u = new URL(url);
134
- b = new URL(base);
134
+ b = new URL(base, PLACEHOLDER);
135
+ u = new URL(url, b);
135
136
  } catch {
136
137
  return url;
137
138
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dskripchenko/markdown-editor",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "A Markdown editor for Vue 3 that edits like a word processor: the value is Markdown, the editing is the @dskripchenko/wysiwyg engine — its toolbar, slash menu, shortcuts and live blocks — with source and side-by-side modes, and a lossless round trip",
5
5
  "keywords": [
6
6
  "markdown",