@ecency/render-helper 2.3.16 → 2.4.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.
Files changed (155) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +171 -17
  3. package/dist/browser/index.d.ts +32 -0
  4. package/dist/browser/index.js +1556 -0
  5. package/dist/browser/index.js.map +1 -0
  6. package/dist/node/index.cjs +1575 -0
  7. package/dist/node/index.cjs.map +1 -0
  8. package/dist/node/index.mjs +1559 -0
  9. package/dist/node/index.mjs.map +1 -0
  10. package/package.json +49 -47
  11. package/lib/cache.d.ts +0 -3
  12. package/lib/cache.js +0 -21
  13. package/lib/cache.js.map +0 -1
  14. package/lib/catch-post-image.d.ts +0 -2
  15. package/lib/catch-post-image.js +0 -76
  16. package/lib/catch-post-image.js.map +0 -1
  17. package/lib/consts/allowed-attributes.const.d.ts +0 -2
  18. package/lib/consts/allowed-attributes.const.js +0 -71
  19. package/lib/consts/allowed-attributes.const.js.map +0 -1
  20. package/lib/consts/dom-parser.const.d.ts +0 -2
  21. package/lib/consts/dom-parser.const.js +0 -12
  22. package/lib/consts/dom-parser.const.js.map +0 -1
  23. package/lib/consts/index.d.ts +0 -5
  24. package/lib/consts/index.js +0 -22
  25. package/lib/consts/index.js.map +0 -1
  26. package/lib/consts/regexes.const.d.ts +0 -44
  27. package/lib/consts/regexes.const.js +0 -49
  28. package/lib/consts/regexes.const.js.map +0 -1
  29. package/lib/consts/section-list.const.d.ts +0 -1
  30. package/lib/consts/section-list.const.js +0 -24
  31. package/lib/consts/section-list.const.js.map +0 -1
  32. package/lib/consts/white-list.const.d.ts +0 -2
  33. package/lib/consts/white-list.const.js +0 -37
  34. package/lib/consts/white-list.const.js.map +0 -1
  35. package/lib/helper.d.ts +0 -5
  36. package/lib/helper.js +0 -60
  37. package/lib/helper.js.map +0 -1
  38. package/lib/index.d.ts +0 -8
  39. package/lib/index.js +0 -19
  40. package/lib/index.js.map +0 -1
  41. package/lib/markdown-2-html.d.ts +0 -2
  42. package/lib/markdown-2-html.js +0 -25
  43. package/lib/markdown-2-html.js.map +0 -1
  44. package/lib/methods/a.method.d.ts +0 -1
  45. package/lib/methods/a.method.js +0 -647
  46. package/lib/methods/a.method.js.map +0 -1
  47. package/lib/methods/clean-reply.method.d.ts +0 -1
  48. package/lib/methods/clean-reply.method.js +0 -37
  49. package/lib/methods/clean-reply.method.js.map +0 -1
  50. package/lib/methods/get-inner-html.method.d.ts +0 -1
  51. package/lib/methods/get-inner-html.method.js +0 -16
  52. package/lib/methods/get-inner-html.method.js.map +0 -1
  53. package/lib/methods/iframe.method.d.ts +0 -1
  54. package/lib/methods/iframe.method.js +0 -159
  55. package/lib/methods/iframe.method.js.map +0 -1
  56. package/lib/methods/img.method.d.ts +0 -4
  57. package/lib/methods/img.method.js +0 -50
  58. package/lib/methods/img.method.js.map +0 -1
  59. package/lib/methods/index.d.ts +0 -7
  60. package/lib/methods/index.js +0 -24
  61. package/lib/methods/index.js.map +0 -1
  62. package/lib/methods/linkify.method.d.ts +0 -1
  63. package/lib/methods/linkify.method.js +0 -56
  64. package/lib/methods/linkify.method.js.map +0 -1
  65. package/lib/methods/markdown-to-html.method.d.ts +0 -1
  66. package/lib/methods/markdown-to-html.method.js +0 -98
  67. package/lib/methods/markdown-to-html.method.js.map +0 -1
  68. package/lib/methods/noop.method.d.ts +0 -1
  69. package/lib/methods/noop.method.js +0 -6
  70. package/lib/methods/noop.method.js.map +0 -1
  71. package/lib/methods/p.method.d.ts +0 -1
  72. package/lib/methods/p.method.js +0 -11
  73. package/lib/methods/p.method.js.map +0 -1
  74. package/lib/methods/remove-child-nodes.method.d.ts +0 -1
  75. package/lib/methods/remove-child-nodes.method.js +0 -10
  76. package/lib/methods/remove-child-nodes.method.js.map +0 -1
  77. package/lib/methods/sanitize-html.method.d.ts +0 -1
  78. package/lib/methods/sanitize-html.method.js +0 -42
  79. package/lib/methods/sanitize-html.method.js.map +0 -1
  80. package/lib/methods/text.method.d.ts +0 -1
  81. package/lib/methods/text.method.js +0 -69
  82. package/lib/methods/text.method.js.map +0 -1
  83. package/lib/methods/traverse.method.d.ts +0 -3
  84. package/lib/methods/traverse.method.js +0 -38
  85. package/lib/methods/traverse.method.js.map +0 -1
  86. package/lib/post-body-summary.d.ts +0 -2
  87. package/lib/post-body-summary.js +0 -123
  88. package/lib/post-body-summary.js.map +0 -1
  89. package/lib/proxify-image-src.d.ts +0 -5
  90. package/lib/proxify-image-src.js +0 -86
  91. package/lib/proxify-image-src.js.map +0 -1
  92. package/lib/render-helper.js +0 -1
  93. package/lib/types/entry.interface.d.ts +0 -7
  94. package/lib/types/entry.interface.js +0 -3
  95. package/lib/types/entry.interface.js.map +0 -1
  96. package/lib/types/index.d.ts +0 -2
  97. package/lib/types/index.js +0 -19
  98. package/lib/types/index.js.map +0 -1
  99. package/lib/types/xss-white-list.interface.d.ts +0 -6
  100. package/lib/types/xss-white-list.interface.js +0 -3
  101. package/lib/types/xss-white-list.interface.js.map +0 -1
  102. package/src/cache.ts +0 -15
  103. package/src/catch-post-image.spec.ts +0 -144
  104. package/src/catch-post-image.ts +0 -78
  105. package/src/consts/allowed-attributes.const.ts +0 -69
  106. package/src/consts/dom-parser.const.ts +0 -6
  107. package/src/consts/index.ts +0 -5
  108. package/src/consts/regexes.const.ts +0 -46
  109. package/src/consts/section-list.const.ts +0 -20
  110. package/src/consts/white-list.const.ts +0 -33
  111. package/src/external-types/multihashes.d.ts +0 -3
  112. package/src/helper.spec.ts +0 -16
  113. package/src/helper.ts +0 -61
  114. package/src/index.ts +0 -18
  115. package/src/markdown-2-html.spec.ts +0 -1239
  116. package/src/markdown-2-html.ts +0 -25
  117. package/src/methods/a.method.ts +0 -791
  118. package/src/methods/clean-reply.method.ts +0 -32
  119. package/src/methods/get-inner-html.method.ts +0 -11
  120. package/src/methods/iframe.method.ts +0 -176
  121. package/src/methods/img.method.ts +0 -62
  122. package/src/methods/index.ts +0 -7
  123. package/src/methods/linkify.method.ts +0 -61
  124. package/src/methods/markdown-to-html.method.ts +0 -104
  125. package/src/methods/noop.method.ts +0 -1
  126. package/src/methods/p.method.ts +0 -6
  127. package/src/methods/remove-child-nodes.method.ts +0 -5
  128. package/src/methods/sanitize-html.method.ts +0 -32
  129. package/src/methods/text.method.ts +0 -77
  130. package/src/methods/traverse.method.ts +0 -33
  131. package/src/post-body-summary.spec.ts +0 -150
  132. package/src/post-body-summary.ts +0 -130
  133. package/src/proxify-image-src.spec.ts +0 -76
  134. package/src/proxify-image-src.ts +0 -77
  135. package/src/sanitize-html.spec.ts +0 -15
  136. package/src/test/data/index.ts +0 -12
  137. package/src/test/data/json/muratkbesiroglu____sci-fi-novel-underground-city-part-13.json +0 -2120
  138. package/src/test/data/json/steemitboard____steemitboard-notify-dunsky-20181210t153450000z.json +0 -47
  139. package/src/test/data/legacy/10.json +0 -5
  140. package/src/test/data/legacy/20.json +0 -5
  141. package/src/test/data/legacy/21.json +0 -5
  142. package/src/test/data/legacy/2112524.json +0 -5
  143. package/src/test/data/legacy/22.json +0 -5
  144. package/src/test/data/legacy/23.json +0 -5
  145. package/src/test/data/legacy/24.json +0 -5
  146. package/src/test/data/legacy/25.json +0 -5
  147. package/src/test/data/legacy/26.json +0 -5
  148. package/src/test/data/legacy/27.JSON +0 -5
  149. package/src/test/data/legacy/28.json +0 -5
  150. package/src/test/data/legacy/29.json +0 -5
  151. package/src/test/data/legacy/31.json +0 -5
  152. package/src/test/snaps.json +0 -8
  153. package/src/types/entry.interface.ts +0 -7
  154. package/src/types/index.ts +0 -2
  155. package/src/types/xss-white-list.interface.ts +0 -7
@@ -1,71 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ALLOWED_ATTRIBUTES = void 0;
4
- exports.ALLOWED_ATTRIBUTES = {
5
- 'a': [
6
- 'href',
7
- 'target',
8
- 'rel',
9
- 'data-permlink',
10
- 'data-tag',
11
- 'data-author',
12
- 'data-href',
13
- 'data-community',
14
- 'data-filter',
15
- 'data-embed-src',
16
- 'data-youtube',
17
- 'data-start-time',
18
- 'data-video-href',
19
- 'data-proposal',
20
- 'data-is-inline',
21
- 'class',
22
- 'title',
23
- 'data-id',
24
- 'id'
25
- ],
26
- 'img': [
27
- 'src',
28
- 'alt',
29
- 'class',
30
- 'loading',
31
- 'fetchpriority',
32
- 'decoding',
33
- 'itemprop'
34
- ],
35
- 'span': ['class', 'id', 'data-align'],
36
- 'iframe': ['src', 'class', 'frameborder', 'allowfullscreen', 'webkitallowfullscreen', 'mozallowfullscreen', 'sandbox'],
37
- 'video': ['src', 'controls', 'poster'],
38
- 'div': ['class', 'id', 'data-align'],
39
- 'strong': [],
40
- 'b': [],
41
- 'i': [],
42
- 'strike': [],
43
- 'em': [],
44
- 'code': [],
45
- 'pre': [],
46
- 'blockquote': ['class'],
47
- 'sup': [],
48
- 'sub': [],
49
- 'h1': ['dir', 'id', 'data-align'],
50
- 'h2': ['dir', 'id', 'data-align'],
51
- 'h3': ['dir', 'id', 'data-align'],
52
- 'h4': ['dir', 'id', 'data-align'],
53
- 'h5': ['dir', 'id', 'data-align'],
54
- 'h6': ['dir', 'id', 'data-align'],
55
- 'p': ['dir', 'id', 'data-align'],
56
- 'center': [],
57
- 'ul': [],
58
- 'ol': [],
59
- 'li': [],
60
- 'table': [],
61
- 'thead': [],
62
- 'tbody': [],
63
- 'tr': [],
64
- 'td': [],
65
- 'th': [],
66
- 'hr': [],
67
- 'br': [],
68
- 'del': [],
69
- 'ins': []
70
- };
71
- //# sourceMappingURL=allowed-attributes.const.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"allowed-attributes.const.js","sourceRoot":"","sources":["../../src/consts/allowed-attributes.const.ts"],"names":[],"mappings":";;;AAEa,QAAA,kBAAkB,GAAiB;IAC9C,GAAG,EAAE;QACH,MAAM;QACN,QAAQ;QACR,KAAK;QACL,eAAe;QACf,UAAU;QACV,aAAa;QACb,WAAW;QACX,gBAAgB;QAChB,aAAa;QACb,gBAAgB;QAChB,cAAc;QACd,iBAAiB;QACjB,iBAAiB;QACjB,eAAe;QACf,gBAAgB;QAChB,OAAO;QACP,OAAO;QACP,SAAS;QACT,IAAI;KACL;IACD,KAAK,EAAE;QACL,KAAK;QACL,KAAK;QACL,OAAO;QACP,SAAS;QACT,eAAe;QACf,UAAU;QACV,UAAU;KACX;IACD,MAAM,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,YAAY,CAAC;IACrC,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,SAAS,CAAC;IACtH,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC;IACtC,KAAK,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,YAAY,CAAC;IACpC,QAAQ,EAAE,EAAE;IACZ,GAAG,EAAE,EAAE;IACP,GAAG,EAAE,EAAE;IACP,QAAQ,EAAE,EAAE;IACZ,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,EAAE;IACV,KAAK,EAAE,EAAE;IACT,YAAY,EAAE,CAAC,OAAO,CAAC;IACvB,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,EAAE;IACT,IAAI,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,YAAY,CAAC;IACjC,IAAI,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,YAAY,CAAC;IACjC,IAAI,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,YAAY,CAAC;IACjC,IAAI,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,YAAY,CAAC;IACjC,IAAI,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,YAAY,CAAC;IACjC,IAAI,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,YAAY,CAAC;IACjC,GAAG,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,YAAY,CAAC;IAChC,QAAQ,EAAE,EAAE;IACZ,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,EAAE;IACX,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,EAAE;CACV,CAAA"}
@@ -1,2 +0,0 @@
1
- import xmldom from 'xmldom';
2
- export declare const DOMParser: xmldom.DOMParser;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.DOMParser = void 0;
7
- var xmldom_1 = __importDefault(require("xmldom"));
8
- var noop_method_1 = require("../methods/noop.method");
9
- exports.DOMParser = new xmldom_1.default.DOMParser({
10
- errorHandler: { warning: noop_method_1.noop, error: noop_method_1.noop }
11
- });
12
- //# sourceMappingURL=dom-parser.const.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dom-parser.const.js","sourceRoot":"","sources":["../../src/consts/dom-parser.const.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA2B;AAC3B,sDAA6C;AAEhC,QAAA,SAAS,GAAG,IAAI,gBAAM,CAAC,SAAS,CAAC;IAC5C,YAAY,EAAE,EAAE,OAAO,EAAE,kBAAI,EAAE,KAAK,EAAE,kBAAI,EAAE;CAC7C,CAAC,CAAA"}
@@ -1,5 +0,0 @@
1
- export * from './white-list.const';
2
- export * from './section-list.const';
3
- export * from './regexes.const';
4
- export * from './allowed-attributes.const';
5
- export * from './dom-parser.const';
@@ -1,22 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./white-list.const"), exports);
18
- __exportStar(require("./section-list.const"), exports);
19
- __exportStar(require("./regexes.const"), exports);
20
- __exportStar(require("./allowed-attributes.const"), exports);
21
- __exportStar(require("./dom-parser.const"), exports);
22
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/consts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAkC;AAClC,uDAAoC;AACpC,kDAA+B;AAC/B,6DAA0C;AAC1C,qDAAkC"}
@@ -1,44 +0,0 @@
1
- export declare const URL_REGEX: RegExp;
2
- export declare const IMG_REGEX: RegExp;
3
- export declare const IPFS_REGEX: RegExp;
4
- export declare const POST_REGEX: RegExp;
5
- export declare const CCC_REGEX: RegExp;
6
- export declare const MENTION_REGEX: RegExp;
7
- export declare const TOPIC_REGEX: RegExp;
8
- export declare const INTERNAL_MENTION_REGEX: RegExp;
9
- export declare const INTERNAL_TOPIC_REGEX: RegExp;
10
- export declare const INTERNAL_POST_TAG_REGEX: RegExp;
11
- export declare const INTERNAL_POST_REGEX: RegExp;
12
- export declare const CUSTOM_COMMUNITY_REGEX: RegExp;
13
- export declare const YOUTUBE_REGEX: RegExp;
14
- export declare const YOUTUBE_EMBED_REGEX: RegExp;
15
- export declare const VIMEO_REGEX: RegExp;
16
- export declare const VIMEO_EMBED_REGEX: RegExp;
17
- export declare const BITCHUTE_REGEX: RegExp;
18
- export declare const D_TUBE_REGEX: RegExp;
19
- export declare const D_TUBE_REGEX2: RegExp;
20
- export declare const D_TUBE_EMBED_REGEX: RegExp;
21
- export declare const TWITCH_REGEX: RegExp;
22
- export declare const DAPPLR_REGEX: RegExp;
23
- export declare const TRUVVL_REGEX: RegExp;
24
- export declare const LBRY_REGEX: RegExp;
25
- export declare const ODYSEE_REGEX: RegExp;
26
- export declare const SKATEHIVE_IPFS_REGEX: RegExp;
27
- export declare const ARCH_REGEX: RegExp;
28
- export declare const SPEAK_REGEX: RegExp;
29
- export declare const SPEAK_EMBED_REGEX: RegExp;
30
- export declare const TWITTER_REGEX: RegExp;
31
- export declare const SPOTIFY_REGEX: RegExp;
32
- export declare const RUMBLE_REGEX: RegExp;
33
- export declare const BRIGHTEON_REGEX: RegExp;
34
- export declare const VIMM_EMBED_REGEX: RegExp;
35
- export declare const SPOTIFY_EMBED_REGEX: RegExp;
36
- export declare const SOUNDCLOUD_EMBED_REGEX: RegExp;
37
- export declare const TWITCH_EMBED_REGEX: RegExp;
38
- export declare const BRAND_NEW_TUBE_REGEX: RegExp;
39
- export declare const LOOM_REGEX: RegExp;
40
- export declare const LOOM_EMBED_REGEX: RegExp;
41
- export declare const AUREAL_EMBED_REGEX: RegExp;
42
- export declare const ENTITY_REGEX: RegExp;
43
- export declare const SECTION_REGEX: RegExp;
44
- export declare const ID_WHITELIST: RegExp;
@@ -1,49 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ID_WHITELIST = exports.SECTION_REGEX = exports.ENTITY_REGEX = exports.AUREAL_EMBED_REGEX = exports.LOOM_EMBED_REGEX = exports.LOOM_REGEX = exports.BRAND_NEW_TUBE_REGEX = exports.TWITCH_EMBED_REGEX = exports.SOUNDCLOUD_EMBED_REGEX = exports.SPOTIFY_EMBED_REGEX = exports.VIMM_EMBED_REGEX = exports.BRIGHTEON_REGEX = exports.RUMBLE_REGEX = exports.SPOTIFY_REGEX = exports.TWITTER_REGEX = exports.SPEAK_EMBED_REGEX = exports.SPEAK_REGEX = exports.ARCH_REGEX = exports.SKATEHIVE_IPFS_REGEX = exports.ODYSEE_REGEX = exports.LBRY_REGEX = exports.TRUVVL_REGEX = exports.DAPPLR_REGEX = exports.TWITCH_REGEX = exports.D_TUBE_EMBED_REGEX = exports.D_TUBE_REGEX2 = exports.D_TUBE_REGEX = exports.BITCHUTE_REGEX = exports.VIMEO_EMBED_REGEX = exports.VIMEO_REGEX = exports.YOUTUBE_EMBED_REGEX = exports.YOUTUBE_REGEX = exports.CUSTOM_COMMUNITY_REGEX = exports.INTERNAL_POST_REGEX = exports.INTERNAL_POST_TAG_REGEX = exports.INTERNAL_TOPIC_REGEX = exports.INTERNAL_MENTION_REGEX = exports.TOPIC_REGEX = exports.MENTION_REGEX = exports.CCC_REGEX = exports.POST_REGEX = exports.IPFS_REGEX = exports.IMG_REGEX = exports.URL_REGEX = void 0;
4
- // link regex
5
- exports.URL_REGEX = /(https?:\/\/[^\s]+)/g;
6
- exports.IMG_REGEX = /(https?:\/\/.*\.(?:tiff?|jpe?g|gif|png|svg|ico|heic|webp))(.*)/gim;
7
- exports.IPFS_REGEX = /^https?:\/\/[^/]+\/(ip[fn]s)\/([^/?#]+)/gim;
8
- exports.POST_REGEX = /^https?:\/\/(.*)\/(.*)\/(@[\w.\d-]+)\/(.*)/i;
9
- exports.CCC_REGEX = /^https?:\/\/(.*)\/ccc\/([\w.\d-]+)\/(.*)/i;
10
- exports.MENTION_REGEX = /^https?:\/\/(.*)\/(@[\w.\d-]+)$/i;
11
- exports.TOPIC_REGEX = /^https?:\/\/(.*)\/(trending|hot|created|promoted|muted|payout)\/(.*)$/i;
12
- exports.INTERNAL_MENTION_REGEX = /^\/@[\w.\d-]+$/i;
13
- exports.INTERNAL_TOPIC_REGEX = /^\/(trending|hot|created|promoted|muted|payout)\/(.*)$/i;
14
- exports.INTERNAL_POST_TAG_REGEX = /(.*)\/(@[\w.\d-]+)\/(.*)/i;
15
- exports.INTERNAL_POST_REGEX = /^\/(@[\w.\d-]+)\/(.*)$/i;
16
- exports.CUSTOM_COMMUNITY_REGEX = /^https?:\/\/(.*)\/c\/(hive-\d+)(.*)/i;
17
- exports.YOUTUBE_REGEX = /(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|shorts\/|.*[?&]v=)|youtu\.be\/)([^"&?\/\s]{11})/g;
18
- exports.YOUTUBE_EMBED_REGEX = /^(https?:)?\/\/www.youtube.com\/(embed|shorts)\/.*/i;
19
- exports.VIMEO_REGEX = /(https?:\/\/)?(www\.)?(?:vimeo)\.com.*(?:videos|video|channels|)\/([\d]+)/i;
20
- exports.VIMEO_EMBED_REGEX = /https:\/\/player\.vimeo\.com\/video\/([0-9]+)/;
21
- exports.BITCHUTE_REGEX = /^(?:https?:\/\/)?(?:www\.)?bitchute.com\/(?:video|embed)\/([a-z0-9]+)/i;
22
- exports.D_TUBE_REGEX = /(https?:\/\/d.tube.#!\/v\/)(\w+)\/(\w+)/g;
23
- exports.D_TUBE_REGEX2 = /(https?:\/\/d.tube\/v\/)(\w+)\/(\w+)/g;
24
- exports.D_TUBE_EMBED_REGEX = /^https:\/\/emb.d.tube\/.*/i;
25
- exports.TWITCH_REGEX = /https?:\/\/(?:www.)?twitch.tv\/(?:(videos)\/)?([a-zA-Z0-9][\w]{3,24})/i;
26
- exports.DAPPLR_REGEX = /^(https?:)?\/\/[a-z]*\.dapplr.in\/file\/dapplr-videos\/.*/i;
27
- exports.TRUVVL_REGEX = /^https?:\/\/embed.truvvl.com\/(@[\w.\d-]+)\/(.*)/i;
28
- exports.LBRY_REGEX = /^(https?:)?\/\/lbry.tv\/\$\/embed\/.*/i;
29
- exports.ODYSEE_REGEX = /^(https?:)?\/\/odysee\.com\/(?:\$|%24)\/embed\/.*/i;
30
- exports.SKATEHIVE_IPFS_REGEX = /^https?:\/\/ipfs\.skatehive\.app\/ipfs\/([^/?#]+)/i;
31
- exports.ARCH_REGEX = /^(https?:)?\/\/archive.org\/embed\/.*/i;
32
- exports.SPEAK_REGEX = /(?:https?:\/\/(?:3speak.([a-z]+)\/watch\?v=)|(?:3speak.([a-z]+)\/embed\?v=))([A-Za-z0-9\_\-\.\/]+)(&.*)?/i;
33
- exports.SPEAK_EMBED_REGEX = /^(https?:)?\/\/3speak.([a-z]+)\/embed\?.*/i;
34
- exports.TWITTER_REGEX = /(?:https?:\/\/(?:(?:twitter\.com\/(.*?)\/status\/(.*))))/gi;
35
- exports.SPOTIFY_REGEX = /^https:\/\/open\.spotify\.com\/playlist\/(.*)?$/gi;
36
- exports.RUMBLE_REGEX = /^https:\/\/rumble.com\/embed\/([a-zA-Z0-9-]+)\/\?pub=\w+/;
37
- exports.BRIGHTEON_REGEX = /^https?:\/\/(www\.)?brighteon\.com\/(?:embed\/)?(.*[0-9].*)/i;
38
- exports.VIMM_EMBED_REGEX = /^https:\/\/www.vimm.tv\/.*/i;
39
- exports.SPOTIFY_EMBED_REGEX = /^https:\/\/open\.spotify\.com\/(embed|embed-podcast)\/(playlist|show|episode|track|album)\/(.*)/i;
40
- exports.SOUNDCLOUD_EMBED_REGEX = /^https:\/\/w.soundcloud.com\/player\/.*/i;
41
- exports.TWITCH_EMBED_REGEX = /^(https?:)?\/\/player.twitch.tv\/.*/i;
42
- exports.BRAND_NEW_TUBE_REGEX = /^https:\/\/brandnewtube\.com\/embed\/[a-z0-9]+$/i;
43
- exports.LOOM_REGEX = /^(https?:)?\/\/www.loom.com\/share\/(.*)/i;
44
- exports.LOOM_EMBED_REGEX = /^(https?:)?\/\/www.loom.com\/embed\/(.*)/i;
45
- exports.AUREAL_EMBED_REGEX = /^(https?:\/\/)?(www\.)?(?:aureal-embed)\.web\.app\/([0-9]+)/i;
46
- exports.ENTITY_REGEX = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/ig;
47
- exports.SECTION_REGEX = /\B(\#[\da-zA-Z-_]+\b)(?!;)/i;
48
- exports.ID_WHITELIST = /^[A-Za-z][-A-Za-z0-9_]*$/;
49
- //# sourceMappingURL=regexes.const.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"regexes.const.js","sourceRoot":"","sources":["../../src/consts/regexes.const.ts"],"names":[],"mappings":";;;AAAA,aAAa;AACA,QAAA,SAAS,GAAG,sBAAsB,CAAA;AAClC,QAAA,SAAS,GAAG,mEAAmE,CAAA;AAC/E,QAAA,UAAU,GAAG,4CAA4C,CAAA;AACzD,QAAA,UAAU,GAAG,6CAA6C,CAAA;AAC1D,QAAA,SAAS,GAAG,2CAA2C,CAAA;AACvD,QAAA,aAAa,GAAG,kCAAkC,CAAA;AAClD,QAAA,WAAW,GAAG,wEAAwE,CAAA;AACtF,QAAA,sBAAsB,GAAG,iBAAiB,CAAA;AAC1C,QAAA,oBAAoB,GAAG,yDAAyD,CAAA;AAChF,QAAA,uBAAuB,GAAG,2BAA2B,CAAA;AACrD,QAAA,mBAAmB,GAAG,yBAAyB,CAAA;AAC/C,QAAA,sBAAsB,GAAG,sCAAsC,CAAA;AAC/D,QAAA,aAAa,GAAG,sGAAsG,CAAA;AACtH,QAAA,mBAAmB,GAAG,qDAAqD,CAAA;AAC3E,QAAA,WAAW,GAAG,4EAA4E,CAAA;AAC1F,QAAA,iBAAiB,GAAG,+CAA+C,CAAA;AACnE,QAAA,cAAc,GAAG,wEAAwE,CAAA;AACzF,QAAA,YAAY,GAAG,0CAA0C,CAAA;AACzD,QAAA,aAAa,GAAG,uCAAuC,CAAA;AACvD,QAAA,kBAAkB,GAAG,4BAA4B,CAAA;AACjD,QAAA,YAAY,GAAG,wEAAwE,CAAA;AACvF,QAAA,YAAY,GAAG,4DAA4D,CAAA;AAC3E,QAAA,YAAY,GAAG,mDAAmD,CAAA;AAClE,QAAA,UAAU,GAAG,wCAAwC,CAAA;AACrD,QAAA,YAAY,GAAG,oDAAoD,CAAA;AACnE,QAAA,oBAAoB,GAAG,oDAAoD,CAAA;AAC3E,QAAA,UAAU,GAAG,wCAAwC,CAAA;AACrD,QAAA,WAAW,GAAG,2GAA2G,CAAA;AACzH,QAAA,iBAAiB,GAAG,4CAA4C,CAAA;AAChE,QAAA,aAAa,GAAG,4DAA4D,CAAA;AAC5E,QAAA,aAAa,GAAG,mDAAmD,CAAA;AACnE,QAAA,YAAY,GAAI,0DAA0D,CAAA;AAC1E,QAAA,eAAe,GAAG,8DAA8D,CAAA;AAChF,QAAA,gBAAgB,GAAG,6BAA6B,CAAA;AAChD,QAAA,mBAAmB,GAAG,kGAAkG,CAAA;AACxH,QAAA,sBAAsB,GAAG,0CAA0C,CAAA;AACnE,QAAA,kBAAkB,GAAG,sCAAsC,CAAA;AAC3D,QAAA,oBAAoB,GAAG,kDAAkD,CAAA;AACzE,QAAA,UAAU,GAAG,2CAA2C,CAAA;AACxD,QAAA,gBAAgB,GAAG,2CAA2C,CAAA;AAC9D,QAAA,kBAAkB,GAAG,8DAA8D,CAAA;AACnF,QAAA,YAAY,GAAG,gDAAgD,CAAA;AAC/D,QAAA,aAAa,GAAG,6BAA6B,CAAA;AAC7C,QAAA,YAAY,GAAG,0BAA0B,CAAA"}
@@ -1 +0,0 @@
1
- export declare const SECTION_LIST: string[];
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SECTION_LIST = void 0;
4
- exports.SECTION_LIST = [
5
- 'wallet',
6
- 'feed',
7
- 'followers',
8
- 'following',
9
- 'points',
10
- 'communities',
11
- 'posts',
12
- 'blog',
13
- 'comments',
14
- 'replies',
15
- 'settings',
16
- 'engine',
17
- 'permissions',
18
- 'referrals',
19
- 'payout',
20
- 'activities',
21
- 'spk',
22
- 'trail'
23
- ];
24
- //# sourceMappingURL=section-list.const.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"section-list.const.js","sourceRoot":"","sources":["../../src/consts/section-list.const.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG;IAC1B,QAAQ;IACR,MAAM;IACN,WAAW;IACX,WAAW;IACX,QAAQ;IACR,aAAa;IACb,OAAO;IACP,MAAM;IACN,UAAU;IACV,SAAS;IACT,UAAU;IACV,QAAQ;IACR,aAAa;IACb,WAAW;IACX,QAAQ;IACR,YAAY;IACZ,KAAK;IACL,OAAO;CACR,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const WHITE_LIST: string[];
2
- export declare const OLD_LIST: string[];
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OLD_LIST = exports.WHITE_LIST = void 0;
4
- exports.WHITE_LIST = [
5
- 'ecency.com',
6
- 'hive.blog',
7
- 'peakd.com',
8
- 'travelfeed.io',
9
- 'dapplr.in',
10
- 'leofinance.io',
11
- 'inleo.io',
12
- 'proofofbrain.io',
13
- 'stemgeeks.net',
14
- 'hiveblockexplorer.com',
15
- 'proofofbrain.blog',
16
- 'weedcash.network',
17
- 'dapplr.in',
18
- 'liketu.com',
19
- 'bilpcoin.com',
20
- 'inji.com'
21
- ];
22
- exports.OLD_LIST = [
23
- 'busy.org',
24
- 'steemit.com',
25
- 'esteem.app',
26
- 'steempeak.com',
27
- 'partiko.app',
28
- 'chainbb.com',
29
- 'utopian.io',
30
- 'steemkr.com',
31
- 'strimi.pl',
32
- 'steemhunt.com',
33
- 'ulogs.org',
34
- 'hede.io',
35
- 'naturalmedicine.io'
36
- ];
37
- //# sourceMappingURL=white-list.const.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"white-list.const.js","sourceRoot":"","sources":["../../src/consts/white-list.const.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG;IACxB,YAAY;IACZ,WAAW;IACX,WAAW;IACX,eAAe;IACf,WAAW;IACX,eAAe;IACf,UAAU;IACV,iBAAiB;IACjB,eAAe;IACf,uBAAuB;IACvB,mBAAmB;IACnB,kBAAkB;IAClB,WAAW;IACX,YAAY;IACZ,cAAc;IACd,UAAU;CACX,CAAA;AACY,QAAA,QAAQ,GAAG;IACtB,UAAU;IACV,aAAa;IACb,YAAY;IACZ,eAAe;IACf,aAAa;IACb,aAAa;IACb,YAAY;IACZ,aAAa;IACb,WAAW;IACX,eAAe;IACf,WAAW;IACX,SAAS;IACT,oBAAoB;CACrB,CAAA"}
package/lib/helper.d.ts DELETED
@@ -1,5 +0,0 @@
1
- export declare function createDoc(html: string): Document | null;
2
- export declare function makeEntryCacheKey(entry: any): string;
3
- export declare function extractYtStartTime(url: string): string;
4
- export declare function isValidPermlink(permlink: string): boolean;
5
- export declare function isValidUsername(username: string): boolean;
package/lib/helper.js DELETED
@@ -1,60 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isValidUsername = exports.isValidPermlink = exports.extractYtStartTime = exports.makeEntryCacheKey = exports.createDoc = void 0;
4
- var consts_1 = require("./consts");
5
- function createDoc(html) {
6
- if (html.trim() === '') {
7
- return null;
8
- }
9
- var doc = consts_1.DOMParser.parseFromString(html, 'text/html');
10
- return doc;
11
- }
12
- exports.createDoc = createDoc;
13
- function makeEntryCacheKey(entry) {
14
- return "".concat(entry.author, "-").concat(entry.permlink, "-").concat(entry.last_update, "-").concat(entry.updated);
15
- }
16
- exports.makeEntryCacheKey = makeEntryCacheKey;
17
- function extractYtStartTime(url) {
18
- try {
19
- var urlObj = new URL(url);
20
- var params = new URLSearchParams(urlObj.search);
21
- if (params.has('t')) {
22
- return '' + parseInt(params.get('t')); //parsing is important as sometimes t is famated '123s';
23
- }
24
- else if (params.has('start')) {
25
- return params.get('start');
26
- }
27
- }
28
- catch (error) {
29
- return '';
30
- }
31
- }
32
- exports.extractYtStartTime = extractYtStartTime;
33
- function isValidPermlink(permlink) {
34
- // Should not contain image extensions, query params, or fragments
35
- var isImage = /\.(jpg|jpeg|png|webp|gif|svg)$/i.test(permlink);
36
- var hasSpecialChars = /[?#]/.test(permlink);
37
- var isCleanFormat = /^[a-z0-9-]+$/.test(permlink); // Hive standard
38
- return isCleanFormat && !isImage && !hasSpecialChars;
39
- }
40
- exports.isValidPermlink = isValidPermlink;
41
- // Reference: https://en.wikipedia.org/wiki/Domain_Name_System#Domain_name_syntax
42
- // Hive account names must follow similar rules to DNS (RFC 1035)
43
- var LABEL_REGEX = /^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/;
44
- function isValidUsername(username) {
45
- if (!username || typeof username !== 'string')
46
- return false;
47
- if (username.length > 16)
48
- return false;
49
- var labels = username.split('.');
50
- return labels.every(function (label) {
51
- return (label.length >= 3 &&
52
- label.length <= 16 &&
53
- /^[a-z]/.test(label) && // must start with a letter
54
- LABEL_REGEX.test(label) && // a-z0-9, hyphens, no start/end hyphen
55
- !label.includes('..') // double dots are impossible after split, but just in case
56
- );
57
- });
58
- }
59
- exports.isValidUsername = isValidUsername;
60
- //# sourceMappingURL=helper.js.map
package/lib/helper.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"helper.js","sourceRoot":"","sources":["../src/helper.ts"],"names":[],"mappings":";;;AAAA,mCAAoC;AAEpC,SAAgB,SAAS,CAAC,IAAY;IACpC,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QACtB,OAAO,IAAI,CAAA;KACZ;IAED,IAAM,GAAG,GAAG,kBAAS,CAAC,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,CAAA;IAExD,OAAO,GAAG,CAAA;AACZ,CAAC;AARD,8BAQC;AAED,SAAgB,iBAAiB,CAAC,KAAU;IAC1C,OAAO,UAAG,KAAK,CAAC,MAAM,cAAI,KAAK,CAAC,QAAQ,cAAI,KAAK,CAAC,WAAW,cAAI,KAAK,CAAC,OAAO,CAAE,CAAA;AAClF,CAAC;AAFD,8CAEC;AAED,SAAgB,kBAAkB,CAAC,GAAU;IAC3C,IAAI;QACF,IAAM,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QAC5B,IAAM,MAAM,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAClD,IAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,EAAC;YACjB,OAAO,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,wDAAwD;SAChG;aAAK,IAAI,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,EAAC;YAC5B,OAAO,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;SAC5B;KACF;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,EAAE,CAAC;KACX;AACH,CAAC;AAZD,gDAYC;AACD,SAAgB,eAAe,CAAC,QAAgB;IAC9C,kEAAkE;IAClE,IAAM,OAAO,GAAG,iCAAiC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACjE,IAAM,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC9C,IAAM,aAAa,GAAG,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,gBAAgB;IAErE,OAAO,aAAa,IAAI,CAAC,OAAO,IAAI,CAAC,eAAe,CAAC;AACvD,CAAC;AAPD,0CAOC;AAED,iFAAiF;AACjF,iEAAiE;AACjE,IAAM,WAAW,GAAG,iCAAiC,CAAC;AAEtD,SAAgB,eAAe,CAAC,QAAgB;IAC9C,IAAI,CAAC,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5D,IAAI,QAAQ,CAAC,MAAM,GAAG,EAAE;QAAE,OAAO,KAAK,CAAC;IAEvC,IAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAEnC,OAAO,MAAM,CAAC,KAAK,CAAC,UAAA,KAAK;QACvB,OAAO,CACL,KAAK,CAAC,MAAM,IAAI,CAAC;YACjB,KAAK,CAAC,MAAM,IAAI,EAAE;YAClB,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAuB,2BAA2B;YACtE,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,IAAoB,uCAAuC;YAClF,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAsB,2DAA2D;SACvG,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAfD,0CAeC"}
package/lib/index.d.ts DELETED
@@ -1,8 +0,0 @@
1
- import { markdown2Html as renderPostBody } from './markdown-2-html';
2
- import { catchPostImage } from './catch-post-image';
3
- import { getPostBodySummary as postBodySummary } from './post-body-summary';
4
- import { setProxyBase, proxifyImageSrc } from './proxify-image-src';
5
- import { setCacheSize } from './cache';
6
- import { SECTION_LIST } from './consts';
7
- import { isValidPermlink } from "./helper";
8
- export { renderPostBody, catchPostImage, postBodySummary, proxifyImageSrc, setProxyBase, setCacheSize, SECTION_LIST, isValidPermlink };
package/lib/index.js DELETED
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isValidPermlink = exports.SECTION_LIST = exports.setCacheSize = exports.setProxyBase = exports.proxifyImageSrc = exports.postBodySummary = exports.catchPostImage = exports.renderPostBody = void 0;
4
- var markdown_2_html_1 = require("./markdown-2-html");
5
- Object.defineProperty(exports, "renderPostBody", { enumerable: true, get: function () { return markdown_2_html_1.markdown2Html; } });
6
- var catch_post_image_1 = require("./catch-post-image");
7
- Object.defineProperty(exports, "catchPostImage", { enumerable: true, get: function () { return catch_post_image_1.catchPostImage; } });
8
- var post_body_summary_1 = require("./post-body-summary");
9
- Object.defineProperty(exports, "postBodySummary", { enumerable: true, get: function () { return post_body_summary_1.getPostBodySummary; } });
10
- var proxify_image_src_1 = require("./proxify-image-src");
11
- Object.defineProperty(exports, "setProxyBase", { enumerable: true, get: function () { return proxify_image_src_1.setProxyBase; } });
12
- Object.defineProperty(exports, "proxifyImageSrc", { enumerable: true, get: function () { return proxify_image_src_1.proxifyImageSrc; } });
13
- var cache_1 = require("./cache");
14
- Object.defineProperty(exports, "setCacheSize", { enumerable: true, get: function () { return cache_1.setCacheSize; } });
15
- var consts_1 = require("./consts");
16
- Object.defineProperty(exports, "SECTION_LIST", { enumerable: true, get: function () { return consts_1.SECTION_LIST; } });
17
- var helper_1 = require("./helper");
18
- Object.defineProperty(exports, "isValidPermlink", { enumerable: true, get: function () { return helper_1.isValidPermlink; } });
19
- //# sourceMappingURL=index.js.map
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,qDAAmE;AASjE,+FATwB,+BAAc,OASxB;AARhB,uDAAmD;AASjD,+FATO,iCAAc,OASP;AARhB,yDAA2E;AASzE,gGAT6B,sCAAe,OAS7B;AARjB,yDAAmE;AAUjE,6FAVO,gCAAY,OAUP;AADZ,gGATqB,mCAAe,OASrB;AARjB,iCAAsC;AAUpC,6FAVO,oBAAY,OAUP;AATd,mCAAuC;AAUrC,6FAVO,qBAAY,OAUP;AATd,mCAA2C;AAUzC,gGAVO,wBAAe,OAUP"}
@@ -1,2 +0,0 @@
1
- import { Entry } from './types';
2
- export declare function markdown2Html(obj: Entry | string, forApp?: boolean, webp?: boolean): string;
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.markdown2Html = void 0;
4
- var helper_1 = require("./helper");
5
- var methods_1 = require("./methods");
6
- var cache_1 = require("./cache");
7
- function markdown2Html(obj, forApp, webp) {
8
- if (forApp === void 0) { forApp = true; }
9
- if (webp === void 0) { webp = false; }
10
- if (typeof obj === 'string') {
11
- obj = (0, methods_1.cleanReply)(obj);
12
- return (0, methods_1.markdownToHTML)(obj, forApp, webp);
13
- }
14
- var key = "".concat((0, helper_1.makeEntryCacheKey)(obj), "-md").concat(webp ? '-webp' : '');
15
- var item = (0, cache_1.cacheGet)(key);
16
- if (item) {
17
- return item;
18
- }
19
- obj.body = (0, methods_1.cleanReply)(obj.body);
20
- var res = (0, methods_1.markdownToHTML)(obj.body, forApp, webp);
21
- (0, cache_1.cacheSet)(key, res);
22
- return res;
23
- }
24
- exports.markdown2Html = markdown2Html;
25
- //# sourceMappingURL=markdown-2-html.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdown-2-html.js","sourceRoot":"","sources":["../src/markdown-2-html.ts"],"names":[],"mappings":";;;AAAA,mCAA4C;AAC5C,qCAAsD;AACtD,iCAA4C;AAG5C,SAAgB,aAAa,CAAC,GAAmB,EAAE,MAAa,EAAE,IAAY;IAA3B,uBAAA,EAAA,aAAa;IAAE,qBAAA,EAAA,YAAY;IAC5E,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QAC3B,GAAG,GAAG,IAAA,oBAAU,EAAC,GAAG,CAAC,CAAA;QACrB,OAAO,IAAA,wBAAc,EAAC,GAAa,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;KACnD;IAED,IAAM,GAAG,GAAG,UAAG,IAAA,0BAAiB,EAAC,GAAG,CAAC,gBAAM,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAE,CAAA;IAEhE,IAAM,IAAI,GAAG,IAAA,gBAAQ,EAAS,GAAG,CAAC,CAAA;IAClC,IAAI,IAAI,EAAE;QACR,OAAO,IAAI,CAAA;KACZ;IAED,GAAG,CAAC,IAAI,GAAG,IAAA,oBAAU,EAAC,GAAG,CAAC,IAAI,CAAC,CAAA;IAE/B,IAAM,GAAG,GAAG,IAAA,wBAAc,EAAC,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;IAClD,IAAA,gBAAQ,EAAC,GAAG,EAAE,GAAG,CAAC,CAAA;IAElB,OAAO,GAAG,CAAA;AACZ,CAAC;AAnBD,sCAmBC"}
@@ -1 +0,0 @@
1
- export declare function a(el: HTMLElement | null, forApp: boolean, webp: boolean): void;