quikdown 1.2.14 → 1.2.15

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.
Files changed (59) hide show
  1. package/dist/quikdown-airgap-v1.2.15.zip +0 -0
  2. package/dist/quikdown.cjs +2 -2
  3. package/dist/quikdown.dark.css +1 -1
  4. package/dist/quikdown.esm.js +2 -2
  5. package/dist/quikdown.esm.min.js +2 -2
  6. package/dist/quikdown.esm.min.js.gz +0 -0
  7. package/dist/quikdown.light.css +1 -1
  8. package/dist/quikdown.umd.js +2 -2
  9. package/dist/quikdown.umd.min.js +2 -2
  10. package/dist/quikdown.umd.min.js.gz +0 -0
  11. package/dist/quikdown_ast.cjs +2 -2
  12. package/dist/quikdown_ast.esm.js +2 -2
  13. package/dist/quikdown_ast.esm.min.js +2 -2
  14. package/dist/quikdown_ast.esm.min.js.gz +0 -0
  15. package/dist/quikdown_ast.umd.js +2 -2
  16. package/dist/quikdown_ast.umd.min.js +2 -2
  17. package/dist/quikdown_ast.umd.min.js.gz +0 -0
  18. package/dist/quikdown_ast_html.cjs +3 -3
  19. package/dist/quikdown_ast_html.esm.js +3 -3
  20. package/dist/quikdown_ast_html.esm.min.js +2 -2
  21. package/dist/quikdown_ast_html.esm.min.js.gz +0 -0
  22. package/dist/quikdown_ast_html.umd.js +3 -3
  23. package/dist/quikdown_ast_html.umd.min.js +2 -2
  24. package/dist/quikdown_ast_html.umd.min.js.gz +0 -0
  25. package/dist/quikdown_bd.cjs +2 -2
  26. package/dist/quikdown_bd.esm.js +2 -2
  27. package/dist/quikdown_bd.esm.min.js +2 -2
  28. package/dist/quikdown_bd.esm.min.js.gz +0 -0
  29. package/dist/quikdown_bd.umd.js +2 -2
  30. package/dist/quikdown_bd.umd.min.js +2 -2
  31. package/dist/quikdown_bd.umd.min.js.gz +0 -0
  32. package/dist/quikdown_edit.cjs +3 -3
  33. package/dist/quikdown_edit.esm.js +3 -3
  34. package/dist/quikdown_edit.esm.min.js +3 -3
  35. package/dist/quikdown_edit.esm.min.js.gz +0 -0
  36. package/dist/quikdown_edit.umd.js +3 -3
  37. package/dist/quikdown_edit.umd.min.js +3 -3
  38. package/dist/quikdown_edit.umd.min.js.gz +0 -0
  39. package/dist/quikdown_edit_standalone.esm.js +3 -3
  40. package/dist/quikdown_edit_standalone.esm.min.js +1 -1
  41. package/dist/quikdown_edit_standalone.esm.min.js.gz +0 -0
  42. package/dist/quikdown_edit_standalone.umd.js +3 -3
  43. package/dist/quikdown_edit_standalone.umd.min.js +1 -1
  44. package/dist/quikdown_edit_standalone.umd.min.js.gz +0 -0
  45. package/dist/quikdown_json.cjs +3 -3
  46. package/dist/quikdown_json.esm.js +3 -3
  47. package/dist/quikdown_json.esm.min.js +2 -2
  48. package/dist/quikdown_json.esm.min.js.gz +0 -0
  49. package/dist/quikdown_json.umd.js +3 -3
  50. package/dist/quikdown_json.umd.min.js +2 -2
  51. package/dist/quikdown_json.umd.min.js.gz +0 -0
  52. package/dist/quikdown_yaml.cjs +3 -3
  53. package/dist/quikdown_yaml.esm.js +3 -3
  54. package/dist/quikdown_yaml.esm.min.js +2 -2
  55. package/dist/quikdown_yaml.esm.min.js.gz +0 -0
  56. package/dist/quikdown_yaml.umd.js +3 -3
  57. package/dist/quikdown_yaml.umd.min.js +2 -2
  58. package/dist/quikdown_yaml.umd.min.js.gz +0 -0
  59. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * quikdown_json - JSON Markdown Parser
3
- * @version 1.2.14
3
+ * @version 1.2.15
4
4
  * @license BSD-2-Clause
5
5
  * @copyright DeftIO 2025
6
6
  */
@@ -15,7 +15,7 @@
15
15
  */
16
16
 
17
17
  // Version will be injected at build time
18
- const quikdownVersion$1 = '1.2.14';
18
+ const quikdownVersion$1 = '1.2.15';
19
19
 
20
20
  // Safety limit to prevent infinite loops in list parsing
21
21
  const MAX_LOOP_ITERATIONS = 1000;
@@ -513,7 +513,7 @@ if (typeof window !== 'undefined') {
513
513
 
514
514
 
515
515
  // Version will be injected at build time
516
- const quikdownVersion = '1.2.14';
516
+ const quikdownVersion = '1.2.15';
517
517
 
518
518
  /**
519
519
  * Convert markdown to JSON
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * quikdown_json - JSON Markdown Parser
3
- * @version 1.2.14
3
+ * @version 1.2.15
4
4
  * @license BSD-2-Clause
5
5
  * @copyright DeftIO 2025
6
6
  */
@@ -13,7 +13,7 @@
13
13
  */
14
14
 
15
15
  // Version will be injected at build time
16
- const quikdownVersion$1 = '1.2.14';
16
+ const quikdownVersion$1 = '1.2.15';
17
17
 
18
18
  // Safety limit to prevent infinite loops in list parsing
19
19
  const MAX_LOOP_ITERATIONS = 1000;
@@ -511,7 +511,7 @@ if (typeof window !== 'undefined') {
511
511
 
512
512
 
513
513
  // Version will be injected at build time
514
- const quikdownVersion = '1.2.14';
514
+ const quikdownVersion = '1.2.15';
515
515
 
516
516
  /**
517
517
  * Convert markdown to JSON
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * quikdown_json - JSON Markdown Parser
3
- * @version 1.2.14
3
+ * @version 1.2.15
4
4
  * @license BSD-2-Clause
5
5
  * @copyright DeftIO 2025
6
6
  */
7
- function e(e,n={}){if(!e||"string"!=typeof e)return{type:"document",children:[]};return{type:"document",children:t(e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"))}}function t(e,s){const l=[],r=e.split("\n");let o=0;for(;o<r.length;){const e=r[o];if(""===e.trim()){o++;continue}const s=e.match(/^(```|~~~)(.*)$/);if(s){const[,e,t]=s,n=t.trim(),i=[];for(o++;o<r.length;){if(r[o].match(/^(```|~~~)\s*$/)){o++;break}i.push(r[o]),o++}l.push({type:"code_block",lang:n||null,content:i.join("\n"),fence:e});continue}if(/^---+\s*$/.test(e)||/^\*\*\*+\s*$/.test(e)||/^___+\s*$/.test(e)){l.push({type:"hr"}),o++;continue}const h=e.match(/^(#{1,6})\s*(.+?)\s*#*$/);if(h){const[,e,t]=h;l.push({type:"heading",level:e.length,children:c(t)}),o++;continue}if(e.includes("|")){const e=n(r,o);if(e){l.push(e.node),o=e.nextIndex;continue}}if(e.match(/^>\s*/)){const e=[];for(;o<r.length&&r[o].match(/^>\s*/);)e.push(r[o].replace(/^>\s*/,"")),o++;l.push({type:"blockquote",children:t(e.join("\n"))});continue}if(e.match(/^(\s*)([*\-+]|\d+\.)\s+(.*)$/)){const e=i(r,o);l.push(e.node),o=e.nextIndex;continue}const u=[];for(;o<r.length;){const e=r[o];if(""===e.trim())break;if(/^(```|~~~)/.test(e))break;if(/^#{1,6}\s/.test(e))break;if(/^---+\s*$/.test(e)||/^\*\*\*+\s*$/.test(e)||/^___+\s*$/.test(e))break;if(/^>\s*/.test(e))break;if(/^(\s*)([*\-+]|\d+\.)\s+/.test(e))break;if(e.includes("|")&&o+1<r.length&&/^\|?[\s\-:|]+\|?$/.test(r[o+1]))break;u.push(e),o++}u.length>0&&l.push({type:"paragraph",children:c(u.join("\n"))})}return l}function n(e,t,n){if(t+1>=e.length)return null;const i=e[t],l=e[t+1];if(!/^\|?[\s\-:|]+\|?$/.test(l)||!l.includes("-"))return null;const r=s(i);if(0===r.length)return null;const o=s(l).map(e=>{const t=e.trim();return t.startsWith(":")&&t.endsWith(":")?"center":t.endsWith(":")?"right":"left"}),h=r.map(e=>c(e.trim())),u=[];let d=t+2;for(;d<e.length;){const t=e[d];if(!t.includes("|")||""===t.trim())break;const n=s(t);u.push(n.map(e=>c(e.trim()))),d++}return{node:{type:"table",headers:h,rows:u,alignments:o},nextIndex:d}}function s(e){let t=e.trim();return t.startsWith("|")&&(t=t.slice(1)),t.endsWith("|")&&(t=t.slice(0,-1)),t.split("|")}function i(e,t,n){const s=[];let l=t,r=0;const o=e[l].match(/^(\s*)([*\-+]|\d+\.)\s+(.*)$/),h=/^\d+\./.test(o[2]),u=o[1].length;for(;l<e.length&&r<1e3;){r++;const t=e[l].match(/^(\s*)([*\-+]|\d+\.)\s+(.*)$/);if(!t)break;const[,n,o,d]=t,p=n.length;if(p<u)break;const a=/^\d+\./.test(o);if(p===u&&a!==h)break;if(p>u){const t=[];let n=0;for(;l<e.length&&n<1e3;){n++;const s=e[l],i=s.match(/^(\s*)([*\-+]|\d+\.)\s+/);if(!i)break;if(i[1].length<u)break;if(i[1].length===u)break;t.push(s),l++}if(t.length>0&&s.length>0){const e=i(t,0),n=s[s.length-1];n.children?Array.isArray(n.children)||(n.children=[{type:"paragraph",children:n.children}]):n.children=[],n.children.push(e.node)}continue}const f={type:"list_item",checked:null,children:null},g=d.match(/^\[([x ])\]\s*(.*)$/i);g&&!h?(f.checked="x"===g[1].toLowerCase(),f.children=c(g[2])):f.children=c(d),s.push(f),l++}return{node:{type:"list",ordered:h,items:s},nextIndex:l}}function c(e,t){if(!e)return[];const n=[];let s=e;for(;s.length>0;){if(s.match(/^(.+?)(?: {2}|\\\n|\n)/)&&s.includes("\n")){const e=s.indexOf("\n"),t=s.slice(0,e),i=s.slice(e+1);if(t.endsWith(" ")||t.endsWith("\\")){const e=t.replace(/\\$/,"").replace(/ +$/,"");e&&n.push(...l(e)),n.push({type:"br"}),s=i;continue}}const t=s.match(/^!\[([^\]]*)\]\(\s*([^)\s]+)\s*\)/);if(t){n.push({type:"image",alt:t[1],url:t[2].trim()}),s=s.slice(t[0].length);continue}const i=s.match(/^\[([^\]]+)\]\(\s*([^)\s]+)\s*\)/);if(i){n.push({type:"link",url:i[2].trim(),children:l(i[1])}),s=s.slice(i[0].length);continue}const c=s.match(/^`([^`]+)`/);if(c){n.push({type:"code",value:c[1]}),s=s.slice(c[0].length);continue}const r=s.match(/^(\*\*|__)(.+?)\1/);if(r){n.push({type:"strong",children:l(r[2])}),s=s.slice(r[0].length);continue}const o=s.match(/^~~(.+?)~~/);if(o){n.push({type:"del",children:l(o[1])}),s=s.slice(o[0].length);continue}const h=e[e.length-s.length-1]||"",u=!/[A-Za-z0-9_]/.test(h),d=s.match(/^\*(?!\*)(.+?)(?<!\*)\*(?!\*)/)||u&&s.match(/^_(?![_\s])(.+?)(?<![\s_])_(?![A-Za-z0-9_])/);if(d){n.push({type:"em",children:l(d[1])}),s=s.slice(d[0].length);continue}const p=s.match(/^(https?:\/\/[^\s<>[\]]+)/);if(p){n.push({type:"link",url:p[1],children:[{type:"text",value:p[1]}]}),s=s.slice(p[0].length);continue}const a=s.search(/[`*_~![\\n]|https?:\/\//);if(-1===a){n.push({type:"text",value:s});break}0===a?(n.push({type:"text",value:s[0]}),s=s.slice(1)):(n.push({type:"text",value:s.slice(0,a)}),s=s.slice(a))}return function(e){const t=[];for(const n of e)"text"===n.type&&t.length>0&&"text"===t[t.length-1].type?t[t.length-1].value+=n.value:t.push(n);return t}(n)}function l(e,t){return c(e.replace(/\n/g," "))}e.version="1.2.14","undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&(window.quikdown_ast=e);function r(t,n={}){const s=e(t,n),i=void 0!==n.indent?n.indent:2;return JSON.stringify(s,null,i)}r.parse=e,r.version="1.2.14","undefined"!=typeof module&&module.exports&&(module.exports=r),"undefined"!=typeof window&&(window.quikdown_json=r);export{r as default};
7
+ function e(e,n={}){if(!e||"string"!=typeof e)return{type:"document",children:[]};return{type:"document",children:t(e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"))}}function t(e,s){const l=[],r=e.split("\n");let o=0;for(;o<r.length;){const e=r[o];if(""===e.trim()){o++;continue}const s=e.match(/^(```|~~~)(.*)$/);if(s){const[,e,t]=s,n=t.trim(),i=[];for(o++;o<r.length;){if(r[o].match(/^(```|~~~)\s*$/)){o++;break}i.push(r[o]),o++}l.push({type:"code_block",lang:n||null,content:i.join("\n"),fence:e});continue}if(/^---+\s*$/.test(e)||/^\*\*\*+\s*$/.test(e)||/^___+\s*$/.test(e)){l.push({type:"hr"}),o++;continue}const h=e.match(/^(#{1,6})\s*(.+?)\s*#*$/);if(h){const[,e,t]=h;l.push({type:"heading",level:e.length,children:c(t)}),o++;continue}if(e.includes("|")){const e=n(r,o);if(e){l.push(e.node),o=e.nextIndex;continue}}if(e.match(/^>\s*/)){const e=[];for(;o<r.length&&r[o].match(/^>\s*/);)e.push(r[o].replace(/^>\s*/,"")),o++;l.push({type:"blockquote",children:t(e.join("\n"))});continue}if(e.match(/^(\s*)([*\-+]|\d+\.)\s+(.*)$/)){const e=i(r,o);l.push(e.node),o=e.nextIndex;continue}const u=[];for(;o<r.length;){const e=r[o];if(""===e.trim())break;if(/^(```|~~~)/.test(e))break;if(/^#{1,6}\s/.test(e))break;if(/^---+\s*$/.test(e)||/^\*\*\*+\s*$/.test(e)||/^___+\s*$/.test(e))break;if(/^>\s*/.test(e))break;if(/^(\s*)([*\-+]|\d+\.)\s+/.test(e))break;if(e.includes("|")&&o+1<r.length&&/^\|?[\s\-:|]+\|?$/.test(r[o+1]))break;u.push(e),o++}u.length>0&&l.push({type:"paragraph",children:c(u.join("\n"))})}return l}function n(e,t,n){if(t+1>=e.length)return null;const i=e[t],l=e[t+1];if(!/^\|?[\s\-:|]+\|?$/.test(l)||!l.includes("-"))return null;const r=s(i);if(0===r.length)return null;const o=s(l).map(e=>{const t=e.trim();return t.startsWith(":")&&t.endsWith(":")?"center":t.endsWith(":")?"right":"left"}),h=r.map(e=>c(e.trim())),u=[];let d=t+2;for(;d<e.length;){const t=e[d];if(!t.includes("|")||""===t.trim())break;const n=s(t);u.push(n.map(e=>c(e.trim()))),d++}return{node:{type:"table",headers:h,rows:u,alignments:o},nextIndex:d}}function s(e){let t=e.trim();return t.startsWith("|")&&(t=t.slice(1)),t.endsWith("|")&&(t=t.slice(0,-1)),t.split("|")}function i(e,t,n){const s=[];let l=t,r=0;const o=e[l].match(/^(\s*)([*\-+]|\d+\.)\s+(.*)$/),h=/^\d+\./.test(o[2]),u=o[1].length;for(;l<e.length&&r<1e3;){r++;const t=e[l].match(/^(\s*)([*\-+]|\d+\.)\s+(.*)$/);if(!t)break;const[,n,o,d]=t,p=n.length;if(p<u)break;const a=/^\d+\./.test(o);if(p===u&&a!==h)break;if(p>u){const t=[];let n=0;for(;l<e.length&&n<1e3;){n++;const s=e[l],i=s.match(/^(\s*)([*\-+]|\d+\.)\s+/);if(!i)break;if(i[1].length<u)break;if(i[1].length===u)break;t.push(s),l++}if(t.length>0&&s.length>0){const e=i(t,0),n=s[s.length-1];n.children?Array.isArray(n.children)||(n.children=[{type:"paragraph",children:n.children}]):n.children=[],n.children.push(e.node)}continue}const f={type:"list_item",checked:null,children:null},g=d.match(/^\[([x ])\]\s*(.*)$/i);g&&!h?(f.checked="x"===g[1].toLowerCase(),f.children=c(g[2])):f.children=c(d),s.push(f),l++}return{node:{type:"list",ordered:h,items:s},nextIndex:l}}function c(e,t){if(!e)return[];const n=[];let s=e;for(;s.length>0;){if(s.match(/^(.+?)(?: {2}|\\\n|\n)/)&&s.includes("\n")){const e=s.indexOf("\n"),t=s.slice(0,e),i=s.slice(e+1);if(t.endsWith(" ")||t.endsWith("\\")){const e=t.replace(/\\$/,"").replace(/ +$/,"");e&&n.push(...l(e)),n.push({type:"br"}),s=i;continue}}const t=s.match(/^!\[([^\]]*)\]\(\s*([^)\s]+)\s*\)/);if(t){n.push({type:"image",alt:t[1],url:t[2].trim()}),s=s.slice(t[0].length);continue}const i=s.match(/^\[([^\]]+)\]\(\s*([^)\s]+)\s*\)/);if(i){n.push({type:"link",url:i[2].trim(),children:l(i[1])}),s=s.slice(i[0].length);continue}const c=s.match(/^`([^`]+)`/);if(c){n.push({type:"code",value:c[1]}),s=s.slice(c[0].length);continue}const r=s.match(/^(\*\*|__)(.+?)\1/);if(r){n.push({type:"strong",children:l(r[2])}),s=s.slice(r[0].length);continue}const o=s.match(/^~~(.+?)~~/);if(o){n.push({type:"del",children:l(o[1])}),s=s.slice(o[0].length);continue}const h=e[e.length-s.length-1]||"",u=!/[A-Za-z0-9_]/.test(h),d=s.match(/^\*(?!\*)(.+?)(?<!\*)\*(?!\*)/)||u&&s.match(/^_(?![_\s])(.+?)(?<![\s_])_(?![A-Za-z0-9_])/);if(d){n.push({type:"em",children:l(d[1])}),s=s.slice(d[0].length);continue}const p=s.match(/^(https?:\/\/[^\s<>[\]]+)/);if(p){n.push({type:"link",url:p[1],children:[{type:"text",value:p[1]}]}),s=s.slice(p[0].length);continue}const a=s.search(/[`*_~![\\n]|https?:\/\//);if(-1===a){n.push({type:"text",value:s});break}0===a?(n.push({type:"text",value:s[0]}),s=s.slice(1)):(n.push({type:"text",value:s.slice(0,a)}),s=s.slice(a))}return function(e){const t=[];for(const n of e)"text"===n.type&&t.length>0&&"text"===t[t.length-1].type?t[t.length-1].value+=n.value:t.push(n);return t}(n)}function l(e,t){return c(e.replace(/\n/g," "))}e.version="1.2.15","undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&(window.quikdown_ast=e);function r(t,n={}){const s=e(t,n),i=void 0!==n.indent?n.indent:2;return JSON.stringify(s,null,i)}r.parse=e,r.version="1.2.15","undefined"!=typeof module&&module.exports&&(module.exports=r),"undefined"!=typeof window&&(window.quikdown_json=r);export{r as default};
8
8
  //# sourceMappingURL=quikdown_json.esm.min.js.map
Binary file
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * quikdown_json - JSON Markdown Parser
3
- * @version 1.2.14
3
+ * @version 1.2.15
4
4
  * @license BSD-2-Clause
5
5
  * @copyright DeftIO 2025
6
6
  */
@@ -19,7 +19,7 @@
19
19
  */
20
20
 
21
21
  // Version will be injected at build time
22
- const quikdownVersion$1 = '1.2.14';
22
+ const quikdownVersion$1 = '1.2.15';
23
23
 
24
24
  // Safety limit to prevent infinite loops in list parsing
25
25
  const MAX_LOOP_ITERATIONS = 1000;
@@ -517,7 +517,7 @@
517
517
 
518
518
 
519
519
  // Version will be injected at build time
520
- const quikdownVersion = '1.2.14';
520
+ const quikdownVersion = '1.2.15';
521
521
 
522
522
  /**
523
523
  * Convert markdown to JSON
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * quikdown_json - JSON Markdown Parser
3
- * @version 1.2.14
3
+ * @version 1.2.15
4
4
  * @license BSD-2-Clause
5
5
  * @copyright DeftIO 2025
6
6
  */
7
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).quikdown_json=t()}(this,function(){"use strict";function e(e,n={}){if(!e||"string"!=typeof e)return{type:"document",children:[]};return{type:"document",children:t(e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"))}}function t(e,s){const o=[],l=e.split("\n");let r=0;for(;r<l.length;){const e=l[r];if(""===e.trim()){r++;continue}const s=e.match(/^(```|~~~)(.*)$/);if(s){const[,e,t]=s,n=t.trim(),i=[];for(r++;r<l.length;){if(l[r].match(/^(```|~~~)\s*$/)){r++;break}i.push(l[r]),r++}o.push({type:"code_block",lang:n||null,content:i.join("\n"),fence:e});continue}if(/^---+\s*$/.test(e)||/^\*\*\*+\s*$/.test(e)||/^___+\s*$/.test(e)){o.push({type:"hr"}),r++;continue}const h=e.match(/^(#{1,6})\s*(.+?)\s*#*$/);if(h){const[,e,t]=h;o.push({type:"heading",level:e.length,children:c(t)}),r++;continue}if(e.includes("|")){const e=n(l,r);if(e){o.push(e.node),r=e.nextIndex;continue}}if(e.match(/^>\s*/)){const e=[];for(;r<l.length&&l[r].match(/^>\s*/);)e.push(l[r].replace(/^>\s*/,"")),r++;o.push({type:"blockquote",children:t(e.join("\n"))});continue}if(e.match(/^(\s*)([*\-+]|\d+\.)\s+(.*)$/)){const e=i(l,r);o.push(e.node),r=e.nextIndex;continue}const u=[];for(;r<l.length;){const e=l[r];if(""===e.trim())break;if(/^(```|~~~)/.test(e))break;if(/^#{1,6}\s/.test(e))break;if(/^---+\s*$/.test(e)||/^\*\*\*+\s*$/.test(e)||/^___+\s*$/.test(e))break;if(/^>\s*/.test(e))break;if(/^(\s*)([*\-+]|\d+\.)\s+/.test(e))break;if(e.includes("|")&&r+1<l.length&&/^\|?[\s\-:|]+\|?$/.test(l[r+1]))break;u.push(e),r++}u.length>0&&o.push({type:"paragraph",children:c(u.join("\n"))})}return o}function n(e,t,n){if(t+1>=e.length)return null;const i=e[t],o=e[t+1];if(!/^\|?[\s\-:|]+\|?$/.test(o)||!o.includes("-"))return null;const l=s(i);if(0===l.length)return null;const r=s(o).map(e=>{const t=e.trim();return t.startsWith(":")&&t.endsWith(":")?"center":t.endsWith(":")?"right":"left"}),h=l.map(e=>c(e.trim())),u=[];let d=t+2;for(;d<e.length;){const t=e[d];if(!t.includes("|")||""===t.trim())break;const n=s(t);u.push(n.map(e=>c(e.trim()))),d++}return{node:{type:"table",headers:h,rows:u,alignments:r},nextIndex:d}}function s(e){let t=e.trim();return t.startsWith("|")&&(t=t.slice(1)),t.endsWith("|")&&(t=t.slice(0,-1)),t.split("|")}function i(e,t,n){const s=[];let o=t,l=0;const r=e[o].match(/^(\s*)([*\-+]|\d+\.)\s+(.*)$/),h=/^\d+\./.test(r[2]),u=r[1].length;for(;o<e.length&&l<1e3;){l++;const t=e[o].match(/^(\s*)([*\-+]|\d+\.)\s+(.*)$/);if(!t)break;const[,n,r,d]=t,f=n.length;if(f<u)break;const p=/^\d+\./.test(r);if(f===u&&p!==h)break;if(f>u){const t=[];let n=0;for(;o<e.length&&n<1e3;){n++;const s=e[o],i=s.match(/^(\s*)([*\-+]|\d+\.)\s+/);if(!i)break;if(i[1].length<u)break;if(i[1].length===u)break;t.push(s),o++}if(t.length>0&&s.length>0){const e=i(t,0),n=s[s.length-1];n.children?Array.isArray(n.children)||(n.children=[{type:"paragraph",children:n.children}]):n.children=[],n.children.push(e.node)}continue}const a={type:"list_item",checked:null,children:null},m=d.match(/^\[([x ])\]\s*(.*)$/i);m&&!h?(a.checked="x"===m[1].toLowerCase(),a.children=c(m[2])):a.children=c(d),s.push(a),o++}return{node:{type:"list",ordered:h,items:s},nextIndex:o}}function c(e,t){if(!e)return[];const n=[];let s=e;for(;s.length>0;){if(s.match(/^(.+?)(?: {2}|\\\n|\n)/)&&s.includes("\n")){const e=s.indexOf("\n"),t=s.slice(0,e),i=s.slice(e+1);if(t.endsWith(" ")||t.endsWith("\\")){const e=t.replace(/\\$/,"").replace(/ +$/,"");e&&n.push(...o(e)),n.push({type:"br"}),s=i;continue}}const t=s.match(/^!\[([^\]]*)\]\(\s*([^)\s]+)\s*\)/);if(t){n.push({type:"image",alt:t[1],url:t[2].trim()}),s=s.slice(t[0].length);continue}const i=s.match(/^\[([^\]]+)\]\(\s*([^)\s]+)\s*\)/);if(i){n.push({type:"link",url:i[2].trim(),children:o(i[1])}),s=s.slice(i[0].length);continue}const c=s.match(/^`([^`]+)`/);if(c){n.push({type:"code",value:c[1]}),s=s.slice(c[0].length);continue}const l=s.match(/^(\*\*|__)(.+?)\1/);if(l){n.push({type:"strong",children:o(l[2])}),s=s.slice(l[0].length);continue}const r=s.match(/^~~(.+?)~~/);if(r){n.push({type:"del",children:o(r[1])}),s=s.slice(r[0].length);continue}const h=e[e.length-s.length-1]||"",u=!/[A-Za-z0-9_]/.test(h),d=s.match(/^\*(?!\*)(.+?)(?<!\*)\*(?!\*)/)||u&&s.match(/^_(?![_\s])(.+?)(?<![\s_])_(?![A-Za-z0-9_])/);if(d){n.push({type:"em",children:o(d[1])}),s=s.slice(d[0].length);continue}const f=s.match(/^(https?:\/\/[^\s<>[\]]+)/);if(f){n.push({type:"link",url:f[1],children:[{type:"text",value:f[1]}]}),s=s.slice(f[0].length);continue}const p=s.search(/[`*_~![\\n]|https?:\/\//);if(-1===p){n.push({type:"text",value:s});break}0===p?(n.push({type:"text",value:s[0]}),s=s.slice(1)):(n.push({type:"text",value:s.slice(0,p)}),s=s.slice(p))}return function(e){const t=[];for(const n of e)"text"===n.type&&t.length>0&&"text"===t[t.length-1].type?t[t.length-1].value+=n.value:t.push(n);return t}(n)}function o(e,t){return c(e.replace(/\n/g," "))}e.version="1.2.14","undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&(window.quikdown_ast=e);function l(t,n={}){const s=e(t,n),i=void 0!==n.indent?n.indent:2;return JSON.stringify(s,null,i)}return l.parse=e,l.version="1.2.14","undefined"!=typeof module&&module.exports&&(module.exports=l),"undefined"!=typeof window&&(window.quikdown_json=l),l});
7
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).quikdown_json=t()}(this,function(){"use strict";function e(e,n={}){if(!e||"string"!=typeof e)return{type:"document",children:[]};return{type:"document",children:t(e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"))}}function t(e,s){const o=[],l=e.split("\n");let r=0;for(;r<l.length;){const e=l[r];if(""===e.trim()){r++;continue}const s=e.match(/^(```|~~~)(.*)$/);if(s){const[,e,t]=s,n=t.trim(),i=[];for(r++;r<l.length;){if(l[r].match(/^(```|~~~)\s*$/)){r++;break}i.push(l[r]),r++}o.push({type:"code_block",lang:n||null,content:i.join("\n"),fence:e});continue}if(/^---+\s*$/.test(e)||/^\*\*\*+\s*$/.test(e)||/^___+\s*$/.test(e)){o.push({type:"hr"}),r++;continue}const h=e.match(/^(#{1,6})\s*(.+?)\s*#*$/);if(h){const[,e,t]=h;o.push({type:"heading",level:e.length,children:c(t)}),r++;continue}if(e.includes("|")){const e=n(l,r);if(e){o.push(e.node),r=e.nextIndex;continue}}if(e.match(/^>\s*/)){const e=[];for(;r<l.length&&l[r].match(/^>\s*/);)e.push(l[r].replace(/^>\s*/,"")),r++;o.push({type:"blockquote",children:t(e.join("\n"))});continue}if(e.match(/^(\s*)([*\-+]|\d+\.)\s+(.*)$/)){const e=i(l,r);o.push(e.node),r=e.nextIndex;continue}const u=[];for(;r<l.length;){const e=l[r];if(""===e.trim())break;if(/^(```|~~~)/.test(e))break;if(/^#{1,6}\s/.test(e))break;if(/^---+\s*$/.test(e)||/^\*\*\*+\s*$/.test(e)||/^___+\s*$/.test(e))break;if(/^>\s*/.test(e))break;if(/^(\s*)([*\-+]|\d+\.)\s+/.test(e))break;if(e.includes("|")&&r+1<l.length&&/^\|?[\s\-:|]+\|?$/.test(l[r+1]))break;u.push(e),r++}u.length>0&&o.push({type:"paragraph",children:c(u.join("\n"))})}return o}function n(e,t,n){if(t+1>=e.length)return null;const i=e[t],o=e[t+1];if(!/^\|?[\s\-:|]+\|?$/.test(o)||!o.includes("-"))return null;const l=s(i);if(0===l.length)return null;const r=s(o).map(e=>{const t=e.trim();return t.startsWith(":")&&t.endsWith(":")?"center":t.endsWith(":")?"right":"left"}),h=l.map(e=>c(e.trim())),u=[];let d=t+2;for(;d<e.length;){const t=e[d];if(!t.includes("|")||""===t.trim())break;const n=s(t);u.push(n.map(e=>c(e.trim()))),d++}return{node:{type:"table",headers:h,rows:u,alignments:r},nextIndex:d}}function s(e){let t=e.trim();return t.startsWith("|")&&(t=t.slice(1)),t.endsWith("|")&&(t=t.slice(0,-1)),t.split("|")}function i(e,t,n){const s=[];let o=t,l=0;const r=e[o].match(/^(\s*)([*\-+]|\d+\.)\s+(.*)$/),h=/^\d+\./.test(r[2]),u=r[1].length;for(;o<e.length&&l<1e3;){l++;const t=e[o].match(/^(\s*)([*\-+]|\d+\.)\s+(.*)$/);if(!t)break;const[,n,r,d]=t,f=n.length;if(f<u)break;const p=/^\d+\./.test(r);if(f===u&&p!==h)break;if(f>u){const t=[];let n=0;for(;o<e.length&&n<1e3;){n++;const s=e[o],i=s.match(/^(\s*)([*\-+]|\d+\.)\s+/);if(!i)break;if(i[1].length<u)break;if(i[1].length===u)break;t.push(s),o++}if(t.length>0&&s.length>0){const e=i(t,0),n=s[s.length-1];n.children?Array.isArray(n.children)||(n.children=[{type:"paragraph",children:n.children}]):n.children=[],n.children.push(e.node)}continue}const a={type:"list_item",checked:null,children:null},m=d.match(/^\[([x ])\]\s*(.*)$/i);m&&!h?(a.checked="x"===m[1].toLowerCase(),a.children=c(m[2])):a.children=c(d),s.push(a),o++}return{node:{type:"list",ordered:h,items:s},nextIndex:o}}function c(e,t){if(!e)return[];const n=[];let s=e;for(;s.length>0;){if(s.match(/^(.+?)(?: {2}|\\\n|\n)/)&&s.includes("\n")){const e=s.indexOf("\n"),t=s.slice(0,e),i=s.slice(e+1);if(t.endsWith(" ")||t.endsWith("\\")){const e=t.replace(/\\$/,"").replace(/ +$/,"");e&&n.push(...o(e)),n.push({type:"br"}),s=i;continue}}const t=s.match(/^!\[([^\]]*)\]\(\s*([^)\s]+)\s*\)/);if(t){n.push({type:"image",alt:t[1],url:t[2].trim()}),s=s.slice(t[0].length);continue}const i=s.match(/^\[([^\]]+)\]\(\s*([^)\s]+)\s*\)/);if(i){n.push({type:"link",url:i[2].trim(),children:o(i[1])}),s=s.slice(i[0].length);continue}const c=s.match(/^`([^`]+)`/);if(c){n.push({type:"code",value:c[1]}),s=s.slice(c[0].length);continue}const l=s.match(/^(\*\*|__)(.+?)\1/);if(l){n.push({type:"strong",children:o(l[2])}),s=s.slice(l[0].length);continue}const r=s.match(/^~~(.+?)~~/);if(r){n.push({type:"del",children:o(r[1])}),s=s.slice(r[0].length);continue}const h=e[e.length-s.length-1]||"",u=!/[A-Za-z0-9_]/.test(h),d=s.match(/^\*(?!\*)(.+?)(?<!\*)\*(?!\*)/)||u&&s.match(/^_(?![_\s])(.+?)(?<![\s_])_(?![A-Za-z0-9_])/);if(d){n.push({type:"em",children:o(d[1])}),s=s.slice(d[0].length);continue}const f=s.match(/^(https?:\/\/[^\s<>[\]]+)/);if(f){n.push({type:"link",url:f[1],children:[{type:"text",value:f[1]}]}),s=s.slice(f[0].length);continue}const p=s.search(/[`*_~![\\n]|https?:\/\//);if(-1===p){n.push({type:"text",value:s});break}0===p?(n.push({type:"text",value:s[0]}),s=s.slice(1)):(n.push({type:"text",value:s.slice(0,p)}),s=s.slice(p))}return function(e){const t=[];for(const n of e)"text"===n.type&&t.length>0&&"text"===t[t.length-1].type?t[t.length-1].value+=n.value:t.push(n);return t}(n)}function o(e,t){return c(e.replace(/\n/g," "))}e.version="1.2.15","undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&(window.quikdown_ast=e);function l(t,n={}){const s=e(t,n),i=void 0!==n.indent?n.indent:2;return JSON.stringify(s,null,i)}return l.parse=e,l.version="1.2.15","undefined"!=typeof module&&module.exports&&(module.exports=l),"undefined"!=typeof window&&(window.quikdown_json=l),l});
8
8
  //# sourceMappingURL=quikdown_json.umd.min.js.map
Binary file
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * quikdown_yaml - YAML Markdown Parser
3
- * @version 1.2.14
3
+ * @version 1.2.15
4
4
  * @license BSD-2-Clause
5
5
  * @copyright DeftIO 2025
6
6
  */
@@ -15,7 +15,7 @@
15
15
  */
16
16
 
17
17
  // Version will be injected at build time
18
- const quikdownVersion$1 = '1.2.14';
18
+ const quikdownVersion$1 = '1.2.15';
19
19
 
20
20
  // Safety limit to prevent infinite loops in list parsing
21
21
  const MAX_LOOP_ITERATIONS = 1000;
@@ -512,7 +512,7 @@ if (typeof window !== 'undefined') {
512
512
 
513
513
 
514
514
  // Version will be injected at build time
515
- const quikdownVersion = '1.2.14';
515
+ const quikdownVersion = '1.2.15';
516
516
 
517
517
  /**
518
518
  * Convert markdown to YAML
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * quikdown_yaml - YAML Markdown Parser
3
- * @version 1.2.14
3
+ * @version 1.2.15
4
4
  * @license BSD-2-Clause
5
5
  * @copyright DeftIO 2025
6
6
  */
@@ -13,7 +13,7 @@
13
13
  */
14
14
 
15
15
  // Version will be injected at build time
16
- const quikdownVersion$1 = '1.2.14';
16
+ const quikdownVersion$1 = '1.2.15';
17
17
 
18
18
  // Safety limit to prevent infinite loops in list parsing
19
19
  const MAX_LOOP_ITERATIONS = 1000;
@@ -510,7 +510,7 @@ if (typeof window !== 'undefined') {
510
510
 
511
511
 
512
512
  // Version will be injected at build time
513
- const quikdownVersion = '1.2.14';
513
+ const quikdownVersion = '1.2.15';
514
514
 
515
515
  /**
516
516
  * Convert markdown to YAML
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * quikdown_yaml - YAML Markdown Parser
3
- * @version 1.2.14
3
+ * @version 1.2.15
4
4
  * @license BSD-2-Clause
5
5
  * @copyright DeftIO 2025
6
6
  */
7
- function e(e,n={}){if(!e||"string"!=typeof e)return{type:"document",children:[]};return{type:"document",children:t(e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"))}}function t(e,s){const c=[],l=e.split("\n");let o=0;for(;o<l.length;){const e=l[o];if(""===e.trim()){o++;continue}const s=e.match(/^(```|~~~)(.*)$/);if(s){const[,e,t]=s,n=t.trim(),r=[];for(o++;o<l.length;){if(l[o].match(/^(```|~~~)\s*$/)){o++;break}r.push(l[o]),o++}c.push({type:"code_block",lang:n||null,content:r.join("\n"),fence:e});continue}if(/^---+\s*$/.test(e)||/^\*\*\*+\s*$/.test(e)||/^___+\s*$/.test(e)){c.push({type:"hr"}),o++;continue}const u=e.match(/^(#{1,6})\s*(.+?)\s*#*$/);if(u){const[,e,t]=u;c.push({type:"heading",level:e.length,children:i(t)}),o++;continue}if(e.includes("|")){const e=n(l,o);if(e){c.push(e.node),o=e.nextIndex;continue}}if(e.match(/^>\s*/)){const e=[];for(;o<l.length&&l[o].match(/^>\s*/);)e.push(l[o].replace(/^>\s*/,"")),o++;c.push({type:"blockquote",children:t(e.join("\n"))});continue}if(e.match(/^(\s*)([*\-+]|\d+\.)\s+(.*)$/)){const e=r(l,o);c.push(e.node),o=e.nextIndex;continue}const h=[];for(;o<l.length;){const e=l[o];if(""===e.trim())break;if(/^(```|~~~)/.test(e))break;if(/^#{1,6}\s/.test(e))break;if(/^---+\s*$/.test(e)||/^\*\*\*+\s*$/.test(e)||/^___+\s*$/.test(e))break;if(/^>\s*/.test(e))break;if(/^(\s*)([*\-+]|\d+\.)\s+/.test(e))break;if(e.includes("|")&&o+1<l.length&&/^\|?[\s\-:|]+\|?$/.test(l[o+1]))break;h.push(e),o++}h.length>0&&c.push({type:"paragraph",children:i(h.join("\n"))})}return c}function n(e,t,n){if(t+1>=e.length)return null;const r=e[t],c=e[t+1];if(!/^\|?[\s\-:|]+\|?$/.test(c)||!c.includes("-"))return null;const l=s(r);if(0===l.length)return null;const o=s(c).map(e=>{const t=e.trim();return t.startsWith(":")&&t.endsWith(":")?"center":t.endsWith(":")?"right":"left"}),u=l.map(e=>i(e.trim())),h=[];let f=t+2;for(;f<e.length;){const t=e[f];if(!t.includes("|")||""===t.trim())break;const n=s(t);h.push(n.map(e=>i(e.trim()))),f++}return{node:{type:"table",headers:u,rows:h,alignments:o},nextIndex:f}}function s(e){let t=e.trim();return t.startsWith("|")&&(t=t.slice(1)),t.endsWith("|")&&(t=t.slice(0,-1)),t.split("|")}function r(e,t,n){const s=[];let c=t,l=0;const o=e[c].match(/^(\s*)([*\-+]|\d+\.)\s+(.*)$/),u=/^\d+\./.test(o[2]),h=o[1].length;for(;c<e.length&&l<1e3;){l++;const t=e[c].match(/^(\s*)([*\-+]|\d+\.)\s+(.*)$/);if(!t)break;const[,n,o,f]=t,p=n.length;if(p<h)break;const a=/^\d+\./.test(o);if(p===h&&a!==u)break;if(p>h){const t=[];let n=0;for(;c<e.length&&n<1e3;){n++;const s=e[c],r=s.match(/^(\s*)([*\-+]|\d+\.)\s+/);if(!r)break;if(r[1].length<h)break;if(r[1].length===h)break;t.push(s),c++}if(t.length>0&&s.length>0){const e=r(t,0),n=s[s.length-1];n.children?Array.isArray(n.children)||(n.children=[{type:"paragraph",children:n.children}]):n.children=[],n.children.push(e.node)}continue}const d={type:"list_item",checked:null,children:null},g=f.match(/^\[([x ])\]\s*(.*)$/i);g&&!u?(d.checked="x"===g[1].toLowerCase(),d.children=i(g[2])):d.children=i(f),s.push(d),c++}return{node:{type:"list",ordered:u,items:s},nextIndex:c}}function i(e,t){if(!e)return[];const n=[];let s=e;for(;s.length>0;){if(s.match(/^(.+?)(?: {2}|\\\n|\n)/)&&s.includes("\n")){const e=s.indexOf("\n"),t=s.slice(0,e),r=s.slice(e+1);if(t.endsWith(" ")||t.endsWith("\\")){const e=t.replace(/\\$/,"").replace(/ +$/,"");e&&n.push(...c(e)),n.push({type:"br"}),s=r;continue}}const t=s.match(/^!\[([^\]]*)\]\(\s*([^)\s]+)\s*\)/);if(t){n.push({type:"image",alt:t[1],url:t[2].trim()}),s=s.slice(t[0].length);continue}const r=s.match(/^\[([^\]]+)\]\(\s*([^)\s]+)\s*\)/);if(r){n.push({type:"link",url:r[2].trim(),children:c(r[1])}),s=s.slice(r[0].length);continue}const i=s.match(/^`([^`]+)`/);if(i){n.push({type:"code",value:i[1]}),s=s.slice(i[0].length);continue}const l=s.match(/^(\*\*|__)(.+?)\1/);if(l){n.push({type:"strong",children:c(l[2])}),s=s.slice(l[0].length);continue}const o=s.match(/^~~(.+?)~~/);if(o){n.push({type:"del",children:c(o[1])}),s=s.slice(o[0].length);continue}const u=e[e.length-s.length-1]||"",h=!/[A-Za-z0-9_]/.test(u),f=s.match(/^\*(?!\*)(.+?)(?<!\*)\*(?!\*)/)||h&&s.match(/^_(?![_\s])(.+?)(?<![\s_])_(?![A-Za-z0-9_])/);if(f){n.push({type:"em",children:c(f[1])}),s=s.slice(f[0].length);continue}const p=s.match(/^(https?:\/\/[^\s<>[\]]+)/);if(p){n.push({type:"link",url:p[1],children:[{type:"text",value:p[1]}]}),s=s.slice(p[0].length);continue}const a=s.search(/[`*_~![\\n]|https?:\/\//);if(-1===a){n.push({type:"text",value:s});break}0===a?(n.push({type:"text",value:s[0]}),s=s.slice(1)):(n.push({type:"text",value:s.slice(0,a)}),s=s.slice(a))}return function(e){const t=[];for(const n of e)"text"===n.type&&t.length>0&&"text"===t[t.length-1].type?t[t.length-1].value+=n.value:t.push(n);return t}(n)}function c(e,t){return i(e.replace(/\n/g," "))}e.version="1.2.14","undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&(window.quikdown_ast=e);function l(t,n={}){return o(e(t,n),0)}function o(e,t){const n=" ".repeat(t);if(null==e)return"null";if("boolean"==typeof e)return e?"true":"false";if("number"==typeof e)return String(e);if("string"==typeof e)return h(e);if(Array.isArray(e)){if(0===e.length)return"[]";const s=[];for(const r of e)if("object"!=typeof r||null===r||Array.isArray(r)){const e=o(r,t+1);s.push(`${n}- ${e}`)}else{const e=Object.entries(r);if(e.length>0){const[r,i]=e[0],c=u(i,t+1);s.push(`${n}- ${r}: ${c}`);for(let r=1;r<e.length;r++){const[i,c]=e[r],l=u(c,t+1);s.push(`${n} ${i}: ${l}`)}}else s.push(`${n}- {}`)}return"\n"+s.join("\n")}if("object"==typeof e){const s=Object.entries(e);if(0===s.length)return"{}";const r=[];for(const[e,i]of s){const s=u(i,t);r.push(`${n}${e}: ${s}`)}return r.join("\n")}return String(e)}function u(e,t){if(null==e)return"null";if("boolean"==typeof e)return e?"true":"false";if("number"==typeof e)return String(e);if("string"==typeof e)return h(e);if(Array.isArray(e))return 0===e.length?"[]":o(e,t+1);if("object"==typeof e){return 0===Object.entries(e).length?"{}":"\n"+o(e,t+1)}return String(e)}function h(e){if(!(""===e||e.includes("\n")||e.includes(":")||e.includes("#")||e.includes("'")||e.includes('"')||e.startsWith(" ")||e.endsWith(" ")||e.startsWith("-")||e.startsWith("[")||e.startsWith("{")||"true"===e||"false"===e||"null"===e||"yes"===e||"no"===e||"on"===e||"off"===e||/^\d+$/.test(e)||/^\d+\.\d+$/.test(e)))return e;if(e.includes("\n")){return`"${e.replace(/\n/g,"\\n").replace(/"/g,'\\"')}"`}return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}l.parse=e,l.stringify=function(e){return o(e,0)},l.version="1.2.14","undefined"!=typeof module&&module.exports&&(module.exports=l),"undefined"!=typeof window&&(window.quikdown_yaml=l);export{l as default};
7
+ function e(e,n={}){if(!e||"string"!=typeof e)return{type:"document",children:[]};return{type:"document",children:t(e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"))}}function t(e,s){const c=[],l=e.split("\n");let o=0;for(;o<l.length;){const e=l[o];if(""===e.trim()){o++;continue}const s=e.match(/^(```|~~~)(.*)$/);if(s){const[,e,t]=s,n=t.trim(),r=[];for(o++;o<l.length;){if(l[o].match(/^(```|~~~)\s*$/)){o++;break}r.push(l[o]),o++}c.push({type:"code_block",lang:n||null,content:r.join("\n"),fence:e});continue}if(/^---+\s*$/.test(e)||/^\*\*\*+\s*$/.test(e)||/^___+\s*$/.test(e)){c.push({type:"hr"}),o++;continue}const u=e.match(/^(#{1,6})\s*(.+?)\s*#*$/);if(u){const[,e,t]=u;c.push({type:"heading",level:e.length,children:i(t)}),o++;continue}if(e.includes("|")){const e=n(l,o);if(e){c.push(e.node),o=e.nextIndex;continue}}if(e.match(/^>\s*/)){const e=[];for(;o<l.length&&l[o].match(/^>\s*/);)e.push(l[o].replace(/^>\s*/,"")),o++;c.push({type:"blockquote",children:t(e.join("\n"))});continue}if(e.match(/^(\s*)([*\-+]|\d+\.)\s+(.*)$/)){const e=r(l,o);c.push(e.node),o=e.nextIndex;continue}const h=[];for(;o<l.length;){const e=l[o];if(""===e.trim())break;if(/^(```|~~~)/.test(e))break;if(/^#{1,6}\s/.test(e))break;if(/^---+\s*$/.test(e)||/^\*\*\*+\s*$/.test(e)||/^___+\s*$/.test(e))break;if(/^>\s*/.test(e))break;if(/^(\s*)([*\-+]|\d+\.)\s+/.test(e))break;if(e.includes("|")&&o+1<l.length&&/^\|?[\s\-:|]+\|?$/.test(l[o+1]))break;h.push(e),o++}h.length>0&&c.push({type:"paragraph",children:i(h.join("\n"))})}return c}function n(e,t,n){if(t+1>=e.length)return null;const r=e[t],c=e[t+1];if(!/^\|?[\s\-:|]+\|?$/.test(c)||!c.includes("-"))return null;const l=s(r);if(0===l.length)return null;const o=s(c).map(e=>{const t=e.trim();return t.startsWith(":")&&t.endsWith(":")?"center":t.endsWith(":")?"right":"left"}),u=l.map(e=>i(e.trim())),h=[];let f=t+2;for(;f<e.length;){const t=e[f];if(!t.includes("|")||""===t.trim())break;const n=s(t);h.push(n.map(e=>i(e.trim()))),f++}return{node:{type:"table",headers:u,rows:h,alignments:o},nextIndex:f}}function s(e){let t=e.trim();return t.startsWith("|")&&(t=t.slice(1)),t.endsWith("|")&&(t=t.slice(0,-1)),t.split("|")}function r(e,t,n){const s=[];let c=t,l=0;const o=e[c].match(/^(\s*)([*\-+]|\d+\.)\s+(.*)$/),u=/^\d+\./.test(o[2]),h=o[1].length;for(;c<e.length&&l<1e3;){l++;const t=e[c].match(/^(\s*)([*\-+]|\d+\.)\s+(.*)$/);if(!t)break;const[,n,o,f]=t,p=n.length;if(p<h)break;const a=/^\d+\./.test(o);if(p===h&&a!==u)break;if(p>h){const t=[];let n=0;for(;c<e.length&&n<1e3;){n++;const s=e[c],r=s.match(/^(\s*)([*\-+]|\d+\.)\s+/);if(!r)break;if(r[1].length<h)break;if(r[1].length===h)break;t.push(s),c++}if(t.length>0&&s.length>0){const e=r(t,0),n=s[s.length-1];n.children?Array.isArray(n.children)||(n.children=[{type:"paragraph",children:n.children}]):n.children=[],n.children.push(e.node)}continue}const d={type:"list_item",checked:null,children:null},g=f.match(/^\[([x ])\]\s*(.*)$/i);g&&!u?(d.checked="x"===g[1].toLowerCase(),d.children=i(g[2])):d.children=i(f),s.push(d),c++}return{node:{type:"list",ordered:u,items:s},nextIndex:c}}function i(e,t){if(!e)return[];const n=[];let s=e;for(;s.length>0;){if(s.match(/^(.+?)(?: {2}|\\\n|\n)/)&&s.includes("\n")){const e=s.indexOf("\n"),t=s.slice(0,e),r=s.slice(e+1);if(t.endsWith(" ")||t.endsWith("\\")){const e=t.replace(/\\$/,"").replace(/ +$/,"");e&&n.push(...c(e)),n.push({type:"br"}),s=r;continue}}const t=s.match(/^!\[([^\]]*)\]\(\s*([^)\s]+)\s*\)/);if(t){n.push({type:"image",alt:t[1],url:t[2].trim()}),s=s.slice(t[0].length);continue}const r=s.match(/^\[([^\]]+)\]\(\s*([^)\s]+)\s*\)/);if(r){n.push({type:"link",url:r[2].trim(),children:c(r[1])}),s=s.slice(r[0].length);continue}const i=s.match(/^`([^`]+)`/);if(i){n.push({type:"code",value:i[1]}),s=s.slice(i[0].length);continue}const l=s.match(/^(\*\*|__)(.+?)\1/);if(l){n.push({type:"strong",children:c(l[2])}),s=s.slice(l[0].length);continue}const o=s.match(/^~~(.+?)~~/);if(o){n.push({type:"del",children:c(o[1])}),s=s.slice(o[0].length);continue}const u=e[e.length-s.length-1]||"",h=!/[A-Za-z0-9_]/.test(u),f=s.match(/^\*(?!\*)(.+?)(?<!\*)\*(?!\*)/)||h&&s.match(/^_(?![_\s])(.+?)(?<![\s_])_(?![A-Za-z0-9_])/);if(f){n.push({type:"em",children:c(f[1])}),s=s.slice(f[0].length);continue}const p=s.match(/^(https?:\/\/[^\s<>[\]]+)/);if(p){n.push({type:"link",url:p[1],children:[{type:"text",value:p[1]}]}),s=s.slice(p[0].length);continue}const a=s.search(/[`*_~![\\n]|https?:\/\//);if(-1===a){n.push({type:"text",value:s});break}0===a?(n.push({type:"text",value:s[0]}),s=s.slice(1)):(n.push({type:"text",value:s.slice(0,a)}),s=s.slice(a))}return function(e){const t=[];for(const n of e)"text"===n.type&&t.length>0&&"text"===t[t.length-1].type?t[t.length-1].value+=n.value:t.push(n);return t}(n)}function c(e,t){return i(e.replace(/\n/g," "))}e.version="1.2.15","undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&(window.quikdown_ast=e);function l(t,n={}){return o(e(t,n),0)}function o(e,t){const n=" ".repeat(t);if(null==e)return"null";if("boolean"==typeof e)return e?"true":"false";if("number"==typeof e)return String(e);if("string"==typeof e)return h(e);if(Array.isArray(e)){if(0===e.length)return"[]";const s=[];for(const r of e)if("object"!=typeof r||null===r||Array.isArray(r)){const e=o(r,t+1);s.push(`${n}- ${e}`)}else{const e=Object.entries(r);if(e.length>0){const[r,i]=e[0],c=u(i,t+1);s.push(`${n}- ${r}: ${c}`);for(let r=1;r<e.length;r++){const[i,c]=e[r],l=u(c,t+1);s.push(`${n} ${i}: ${l}`)}}else s.push(`${n}- {}`)}return"\n"+s.join("\n")}if("object"==typeof e){const s=Object.entries(e);if(0===s.length)return"{}";const r=[];for(const[e,i]of s){const s=u(i,t);r.push(`${n}${e}: ${s}`)}return r.join("\n")}return String(e)}function u(e,t){if(null==e)return"null";if("boolean"==typeof e)return e?"true":"false";if("number"==typeof e)return String(e);if("string"==typeof e)return h(e);if(Array.isArray(e))return 0===e.length?"[]":o(e,t+1);if("object"==typeof e){return 0===Object.entries(e).length?"{}":"\n"+o(e,t+1)}return String(e)}function h(e){if(!(""===e||e.includes("\n")||e.includes(":")||e.includes("#")||e.includes("'")||e.includes('"')||e.startsWith(" ")||e.endsWith(" ")||e.startsWith("-")||e.startsWith("[")||e.startsWith("{")||"true"===e||"false"===e||"null"===e||"yes"===e||"no"===e||"on"===e||"off"===e||/^\d+$/.test(e)||/^\d+\.\d+$/.test(e)))return e;if(e.includes("\n")){return`"${e.replace(/\n/g,"\\n").replace(/"/g,'\\"')}"`}return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}l.parse=e,l.stringify=function(e){return o(e,0)},l.version="1.2.15","undefined"!=typeof module&&module.exports&&(module.exports=l),"undefined"!=typeof window&&(window.quikdown_yaml=l);export{l as default};
8
8
  //# sourceMappingURL=quikdown_yaml.esm.min.js.map
Binary file
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * quikdown_yaml - YAML Markdown Parser
3
- * @version 1.2.14
3
+ * @version 1.2.15
4
4
  * @license BSD-2-Clause
5
5
  * @copyright DeftIO 2025
6
6
  */
@@ -19,7 +19,7 @@
19
19
  */
20
20
 
21
21
  // Version will be injected at build time
22
- const quikdownVersion$1 = '1.2.14';
22
+ const quikdownVersion$1 = '1.2.15';
23
23
 
24
24
  // Safety limit to prevent infinite loops in list parsing
25
25
  const MAX_LOOP_ITERATIONS = 1000;
@@ -516,7 +516,7 @@
516
516
 
517
517
 
518
518
  // Version will be injected at build time
519
- const quikdownVersion = '1.2.14';
519
+ const quikdownVersion = '1.2.15';
520
520
 
521
521
  /**
522
522
  * Convert markdown to YAML
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * quikdown_yaml - YAML Markdown Parser
3
- * @version 1.2.14
3
+ * @version 1.2.15
4
4
  * @license BSD-2-Clause
5
5
  * @copyright DeftIO 2025
6
6
  */
7
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).quikdown_yaml=t()}(this,function(){"use strict";function e(e,n={}){if(!e||"string"!=typeof e)return{type:"document",children:[]};return{type:"document",children:t(e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"))}}function t(e,s){const c=[],o=e.split("\n");let l=0;for(;l<o.length;){const e=o[l];if(""===e.trim()){l++;continue}const s=e.match(/^(```|~~~)(.*)$/);if(s){const[,e,t]=s,n=t.trim(),i=[];for(l++;l<o.length;){if(o[l].match(/^(```|~~~)\s*$/)){l++;break}i.push(o[l]),l++}c.push({type:"code_block",lang:n||null,content:i.join("\n"),fence:e});continue}if(/^---+\s*$/.test(e)||/^\*\*\*+\s*$/.test(e)||/^___+\s*$/.test(e)){c.push({type:"hr"}),l++;continue}const u=e.match(/^(#{1,6})\s*(.+?)\s*#*$/);if(u){const[,e,t]=u;c.push({type:"heading",level:e.length,children:r(t)}),l++;continue}if(e.includes("|")){const e=n(o,l);if(e){c.push(e.node),l=e.nextIndex;continue}}if(e.match(/^>\s*/)){const e=[];for(;l<o.length&&o[l].match(/^>\s*/);)e.push(o[l].replace(/^>\s*/,"")),l++;c.push({type:"blockquote",children:t(e.join("\n"))});continue}if(e.match(/^(\s*)([*\-+]|\d+\.)\s+(.*)$/)){const e=i(o,l);c.push(e.node),l=e.nextIndex;continue}const h=[];for(;l<o.length;){const e=o[l];if(""===e.trim())break;if(/^(```|~~~)/.test(e))break;if(/^#{1,6}\s/.test(e))break;if(/^---+\s*$/.test(e)||/^\*\*\*+\s*$/.test(e)||/^___+\s*$/.test(e))break;if(/^>\s*/.test(e))break;if(/^(\s*)([*\-+]|\d+\.)\s+/.test(e))break;if(e.includes("|")&&l+1<o.length&&/^\|?[\s\-:|]+\|?$/.test(o[l+1]))break;h.push(e),l++}h.length>0&&c.push({type:"paragraph",children:r(h.join("\n"))})}return c}function n(e,t,n){if(t+1>=e.length)return null;const i=e[t],c=e[t+1];if(!/^\|?[\s\-:|]+\|?$/.test(c)||!c.includes("-"))return null;const o=s(i);if(0===o.length)return null;const l=s(c).map(e=>{const t=e.trim();return t.startsWith(":")&&t.endsWith(":")?"center":t.endsWith(":")?"right":"left"}),u=o.map(e=>r(e.trim())),h=[];let f=t+2;for(;f<e.length;){const t=e[f];if(!t.includes("|")||""===t.trim())break;const n=s(t);h.push(n.map(e=>r(e.trim()))),f++}return{node:{type:"table",headers:u,rows:h,alignments:l},nextIndex:f}}function s(e){let t=e.trim();return t.startsWith("|")&&(t=t.slice(1)),t.endsWith("|")&&(t=t.slice(0,-1)),t.split("|")}function i(e,t,n){const s=[];let c=t,o=0;const l=e[c].match(/^(\s*)([*\-+]|\d+\.)\s+(.*)$/),u=/^\d+\./.test(l[2]),h=l[1].length;for(;c<e.length&&o<1e3;){o++;const t=e[c].match(/^(\s*)([*\-+]|\d+\.)\s+(.*)$/);if(!t)break;const[,n,l,f]=t,p=n.length;if(p<h)break;const a=/^\d+\./.test(l);if(p===h&&a!==u)break;if(p>h){const t=[];let n=0;for(;c<e.length&&n<1e3;){n++;const s=e[c],i=s.match(/^(\s*)([*\-+]|\d+\.)\s+/);if(!i)break;if(i[1].length<h)break;if(i[1].length===h)break;t.push(s),c++}if(t.length>0&&s.length>0){const e=i(t,0),n=s[s.length-1];n.children?Array.isArray(n.children)||(n.children=[{type:"paragraph",children:n.children}]):n.children=[],n.children.push(e.node)}continue}const d={type:"list_item",checked:null,children:null},g=f.match(/^\[([x ])\]\s*(.*)$/i);g&&!u?(d.checked="x"===g[1].toLowerCase(),d.children=r(g[2])):d.children=r(f),s.push(d),c++}return{node:{type:"list",ordered:u,items:s},nextIndex:c}}function r(e,t){if(!e)return[];const n=[];let s=e;for(;s.length>0;){if(s.match(/^(.+?)(?: {2}|\\\n|\n)/)&&s.includes("\n")){const e=s.indexOf("\n"),t=s.slice(0,e),i=s.slice(e+1);if(t.endsWith(" ")||t.endsWith("\\")){const e=t.replace(/\\$/,"").replace(/ +$/,"");e&&n.push(...c(e)),n.push({type:"br"}),s=i;continue}}const t=s.match(/^!\[([^\]]*)\]\(\s*([^)\s]+)\s*\)/);if(t){n.push({type:"image",alt:t[1],url:t[2].trim()}),s=s.slice(t[0].length);continue}const i=s.match(/^\[([^\]]+)\]\(\s*([^)\s]+)\s*\)/);if(i){n.push({type:"link",url:i[2].trim(),children:c(i[1])}),s=s.slice(i[0].length);continue}const r=s.match(/^`([^`]+)`/);if(r){n.push({type:"code",value:r[1]}),s=s.slice(r[0].length);continue}const o=s.match(/^(\*\*|__)(.+?)\1/);if(o){n.push({type:"strong",children:c(o[2])}),s=s.slice(o[0].length);continue}const l=s.match(/^~~(.+?)~~/);if(l){n.push({type:"del",children:c(l[1])}),s=s.slice(l[0].length);continue}const u=e[e.length-s.length-1]||"",h=!/[A-Za-z0-9_]/.test(u),f=s.match(/^\*(?!\*)(.+?)(?<!\*)\*(?!\*)/)||h&&s.match(/^_(?![_\s])(.+?)(?<![\s_])_(?![A-Za-z0-9_])/);if(f){n.push({type:"em",children:c(f[1])}),s=s.slice(f[0].length);continue}const p=s.match(/^(https?:\/\/[^\s<>[\]]+)/);if(p){n.push({type:"link",url:p[1],children:[{type:"text",value:p[1]}]}),s=s.slice(p[0].length);continue}const a=s.search(/[`*_~![\\n]|https?:\/\//);if(-1===a){n.push({type:"text",value:s});break}0===a?(n.push({type:"text",value:s[0]}),s=s.slice(1)):(n.push({type:"text",value:s.slice(0,a)}),s=s.slice(a))}return function(e){const t=[];for(const n of e)"text"===n.type&&t.length>0&&"text"===t[t.length-1].type?t[t.length-1].value+=n.value:t.push(n);return t}(n)}function c(e,t){return r(e.replace(/\n/g," "))}e.version="1.2.14","undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&(window.quikdown_ast=e);function o(t,n={}){return l(e(t,n),0)}function l(e,t){const n=" ".repeat(t);if(null==e)return"null";if("boolean"==typeof e)return e?"true":"false";if("number"==typeof e)return String(e);if("string"==typeof e)return h(e);if(Array.isArray(e)){if(0===e.length)return"[]";const s=[];for(const i of e)if("object"!=typeof i||null===i||Array.isArray(i)){const e=l(i,t+1);s.push(`${n}- ${e}`)}else{const e=Object.entries(i);if(e.length>0){const[i,r]=e[0],c=u(r,t+1);s.push(`${n}- ${i}: ${c}`);for(let i=1;i<e.length;i++){const[r,c]=e[i],o=u(c,t+1);s.push(`${n} ${r}: ${o}`)}}else s.push(`${n}- {}`)}return"\n"+s.join("\n")}if("object"==typeof e){const s=Object.entries(e);if(0===s.length)return"{}";const i=[];for(const[e,r]of s){const s=u(r,t);i.push(`${n}${e}: ${s}`)}return i.join("\n")}return String(e)}function u(e,t){if(null==e)return"null";if("boolean"==typeof e)return e?"true":"false";if("number"==typeof e)return String(e);if("string"==typeof e)return h(e);if(Array.isArray(e))return 0===e.length?"[]":l(e,t+1);if("object"==typeof e){return 0===Object.entries(e).length?"{}":"\n"+l(e,t+1)}return String(e)}function h(e){if(!(""===e||e.includes("\n")||e.includes(":")||e.includes("#")||e.includes("'")||e.includes('"')||e.startsWith(" ")||e.endsWith(" ")||e.startsWith("-")||e.startsWith("[")||e.startsWith("{")||"true"===e||"false"===e||"null"===e||"yes"===e||"no"===e||"on"===e||"off"===e||/^\d+$/.test(e)||/^\d+\.\d+$/.test(e)))return e;if(e.includes("\n")){return`"${e.replace(/\n/g,"\\n").replace(/"/g,'\\"')}"`}return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}return o.parse=e,o.stringify=function(e){return l(e,0)},o.version="1.2.14","undefined"!=typeof module&&module.exports&&(module.exports=o),"undefined"!=typeof window&&(window.quikdown_yaml=o),o});
7
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).quikdown_yaml=t()}(this,function(){"use strict";function e(e,n={}){if(!e||"string"!=typeof e)return{type:"document",children:[]};return{type:"document",children:t(e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"))}}function t(e,s){const c=[],o=e.split("\n");let l=0;for(;l<o.length;){const e=o[l];if(""===e.trim()){l++;continue}const s=e.match(/^(```|~~~)(.*)$/);if(s){const[,e,t]=s,n=t.trim(),i=[];for(l++;l<o.length;){if(o[l].match(/^(```|~~~)\s*$/)){l++;break}i.push(o[l]),l++}c.push({type:"code_block",lang:n||null,content:i.join("\n"),fence:e});continue}if(/^---+\s*$/.test(e)||/^\*\*\*+\s*$/.test(e)||/^___+\s*$/.test(e)){c.push({type:"hr"}),l++;continue}const u=e.match(/^(#{1,6})\s*(.+?)\s*#*$/);if(u){const[,e,t]=u;c.push({type:"heading",level:e.length,children:r(t)}),l++;continue}if(e.includes("|")){const e=n(o,l);if(e){c.push(e.node),l=e.nextIndex;continue}}if(e.match(/^>\s*/)){const e=[];for(;l<o.length&&o[l].match(/^>\s*/);)e.push(o[l].replace(/^>\s*/,"")),l++;c.push({type:"blockquote",children:t(e.join("\n"))});continue}if(e.match(/^(\s*)([*\-+]|\d+\.)\s+(.*)$/)){const e=i(o,l);c.push(e.node),l=e.nextIndex;continue}const h=[];for(;l<o.length;){const e=o[l];if(""===e.trim())break;if(/^(```|~~~)/.test(e))break;if(/^#{1,6}\s/.test(e))break;if(/^---+\s*$/.test(e)||/^\*\*\*+\s*$/.test(e)||/^___+\s*$/.test(e))break;if(/^>\s*/.test(e))break;if(/^(\s*)([*\-+]|\d+\.)\s+/.test(e))break;if(e.includes("|")&&l+1<o.length&&/^\|?[\s\-:|]+\|?$/.test(o[l+1]))break;h.push(e),l++}h.length>0&&c.push({type:"paragraph",children:r(h.join("\n"))})}return c}function n(e,t,n){if(t+1>=e.length)return null;const i=e[t],c=e[t+1];if(!/^\|?[\s\-:|]+\|?$/.test(c)||!c.includes("-"))return null;const o=s(i);if(0===o.length)return null;const l=s(c).map(e=>{const t=e.trim();return t.startsWith(":")&&t.endsWith(":")?"center":t.endsWith(":")?"right":"left"}),u=o.map(e=>r(e.trim())),h=[];let f=t+2;for(;f<e.length;){const t=e[f];if(!t.includes("|")||""===t.trim())break;const n=s(t);h.push(n.map(e=>r(e.trim()))),f++}return{node:{type:"table",headers:u,rows:h,alignments:l},nextIndex:f}}function s(e){let t=e.trim();return t.startsWith("|")&&(t=t.slice(1)),t.endsWith("|")&&(t=t.slice(0,-1)),t.split("|")}function i(e,t,n){const s=[];let c=t,o=0;const l=e[c].match(/^(\s*)([*\-+]|\d+\.)\s+(.*)$/),u=/^\d+\./.test(l[2]),h=l[1].length;for(;c<e.length&&o<1e3;){o++;const t=e[c].match(/^(\s*)([*\-+]|\d+\.)\s+(.*)$/);if(!t)break;const[,n,l,f]=t,p=n.length;if(p<h)break;const a=/^\d+\./.test(l);if(p===h&&a!==u)break;if(p>h){const t=[];let n=0;for(;c<e.length&&n<1e3;){n++;const s=e[c],i=s.match(/^(\s*)([*\-+]|\d+\.)\s+/);if(!i)break;if(i[1].length<h)break;if(i[1].length===h)break;t.push(s),c++}if(t.length>0&&s.length>0){const e=i(t,0),n=s[s.length-1];n.children?Array.isArray(n.children)||(n.children=[{type:"paragraph",children:n.children}]):n.children=[],n.children.push(e.node)}continue}const d={type:"list_item",checked:null,children:null},g=f.match(/^\[([x ])\]\s*(.*)$/i);g&&!u?(d.checked="x"===g[1].toLowerCase(),d.children=r(g[2])):d.children=r(f),s.push(d),c++}return{node:{type:"list",ordered:u,items:s},nextIndex:c}}function r(e,t){if(!e)return[];const n=[];let s=e;for(;s.length>0;){if(s.match(/^(.+?)(?: {2}|\\\n|\n)/)&&s.includes("\n")){const e=s.indexOf("\n"),t=s.slice(0,e),i=s.slice(e+1);if(t.endsWith(" ")||t.endsWith("\\")){const e=t.replace(/\\$/,"").replace(/ +$/,"");e&&n.push(...c(e)),n.push({type:"br"}),s=i;continue}}const t=s.match(/^!\[([^\]]*)\]\(\s*([^)\s]+)\s*\)/);if(t){n.push({type:"image",alt:t[1],url:t[2].trim()}),s=s.slice(t[0].length);continue}const i=s.match(/^\[([^\]]+)\]\(\s*([^)\s]+)\s*\)/);if(i){n.push({type:"link",url:i[2].trim(),children:c(i[1])}),s=s.slice(i[0].length);continue}const r=s.match(/^`([^`]+)`/);if(r){n.push({type:"code",value:r[1]}),s=s.slice(r[0].length);continue}const o=s.match(/^(\*\*|__)(.+?)\1/);if(o){n.push({type:"strong",children:c(o[2])}),s=s.slice(o[0].length);continue}const l=s.match(/^~~(.+?)~~/);if(l){n.push({type:"del",children:c(l[1])}),s=s.slice(l[0].length);continue}const u=e[e.length-s.length-1]||"",h=!/[A-Za-z0-9_]/.test(u),f=s.match(/^\*(?!\*)(.+?)(?<!\*)\*(?!\*)/)||h&&s.match(/^_(?![_\s])(.+?)(?<![\s_])_(?![A-Za-z0-9_])/);if(f){n.push({type:"em",children:c(f[1])}),s=s.slice(f[0].length);continue}const p=s.match(/^(https?:\/\/[^\s<>[\]]+)/);if(p){n.push({type:"link",url:p[1],children:[{type:"text",value:p[1]}]}),s=s.slice(p[0].length);continue}const a=s.search(/[`*_~![\\n]|https?:\/\//);if(-1===a){n.push({type:"text",value:s});break}0===a?(n.push({type:"text",value:s[0]}),s=s.slice(1)):(n.push({type:"text",value:s.slice(0,a)}),s=s.slice(a))}return function(e){const t=[];for(const n of e)"text"===n.type&&t.length>0&&"text"===t[t.length-1].type?t[t.length-1].value+=n.value:t.push(n);return t}(n)}function c(e,t){return r(e.replace(/\n/g," "))}e.version="1.2.15","undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof window&&(window.quikdown_ast=e);function o(t,n={}){return l(e(t,n),0)}function l(e,t){const n=" ".repeat(t);if(null==e)return"null";if("boolean"==typeof e)return e?"true":"false";if("number"==typeof e)return String(e);if("string"==typeof e)return h(e);if(Array.isArray(e)){if(0===e.length)return"[]";const s=[];for(const i of e)if("object"!=typeof i||null===i||Array.isArray(i)){const e=l(i,t+1);s.push(`${n}- ${e}`)}else{const e=Object.entries(i);if(e.length>0){const[i,r]=e[0],c=u(r,t+1);s.push(`${n}- ${i}: ${c}`);for(let i=1;i<e.length;i++){const[r,c]=e[i],o=u(c,t+1);s.push(`${n} ${r}: ${o}`)}}else s.push(`${n}- {}`)}return"\n"+s.join("\n")}if("object"==typeof e){const s=Object.entries(e);if(0===s.length)return"{}";const i=[];for(const[e,r]of s){const s=u(r,t);i.push(`${n}${e}: ${s}`)}return i.join("\n")}return String(e)}function u(e,t){if(null==e)return"null";if("boolean"==typeof e)return e?"true":"false";if("number"==typeof e)return String(e);if("string"==typeof e)return h(e);if(Array.isArray(e))return 0===e.length?"[]":l(e,t+1);if("object"==typeof e){return 0===Object.entries(e).length?"{}":"\n"+l(e,t+1)}return String(e)}function h(e){if(!(""===e||e.includes("\n")||e.includes(":")||e.includes("#")||e.includes("'")||e.includes('"')||e.startsWith(" ")||e.endsWith(" ")||e.startsWith("-")||e.startsWith("[")||e.startsWith("{")||"true"===e||"false"===e||"null"===e||"yes"===e||"no"===e||"on"===e||"off"===e||/^\d+$/.test(e)||/^\d+\.\d+$/.test(e)))return e;if(e.includes("\n")){return`"${e.replace(/\n/g,"\\n").replace(/"/g,'\\"')}"`}return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}return o.parse=e,o.stringify=function(e){return l(e,0)},o.version="1.2.15","undefined"!=typeof module&&module.exports&&(module.exports=o),"undefined"!=typeof window&&(window.quikdown_yaml=o),o});
8
8
  //# sourceMappingURL=quikdown_yaml.umd.min.js.map
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quikdown",
3
- "version": "1.2.14",
3
+ "version": "1.2.15",
4
4
  "description": "quikdown is a simple markdown to HTML parser that supports fences",
5
5
  "author": "deftio (https://github.com/deftio)",
6
6
  "license": "BSD-2-Clause",