@tickernelz/paperclip-pro-server 2026.927.0 → 2026.927.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-info.json +1 -1
- package/dist/routes/issues.d.ts.map +1 -1
- package/dist/routes/issues.js +177 -45
- package/dist/routes/issues.js.map +1 -1
- package/dist/routes/openapi.d.ts.map +1 -1
- package/dist/routes/openapi.js +1 -0
- package/dist/routes/openapi.js.map +1 -1
- package/dist/services/instance-settings.d.ts.map +1 -1
- package/dist/services/instance-settings.js +3 -1
- package/dist/services/instance-settings.js.map +1 -1
- package/node_modules/mdast-util-to-markdown/index.d.ts +2 -0
- package/node_modules/mdast-util-to-markdown/lib/configure.d.ts +5 -0
- package/node_modules/mdast-util-to-markdown/lib/configure.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/configure.js +19 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/blockquote.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/blockquote.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js +12 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/break.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/break.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/break.js +16 -5
- package/node_modules/mdast-util-to-markdown/lib/handle/code.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/code.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/code.js +13 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/definition.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/definition.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/definition.js +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/emphasis.d.ts +30 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/emphasis.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js +39 -41
- package/node_modules/mdast-util-to-markdown/lib/handle/heading.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/heading.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/heading.js +11 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/html.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/html.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/html.js +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/image-reference.d.ts +10 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/image-reference.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js +17 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/image.d.ts +10 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/image.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/image.js +10 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/inline-code.d.ts +9 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/inline-code.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js +14 -4
- package/node_modules/mdast-util-to-markdown/lib/handle/link-reference.d.ts +10 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/link-reference.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js +17 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/link.d.ts +13 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/link.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/link.js +24 -9
- package/node_modules/mdast-util-to-markdown/lib/handle/list-item.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/list-item.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/list-item.js +12 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/list.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/list.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/list.js +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/paragraph.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/paragraph.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/root.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/root.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/root.js +13 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/strong.d.ts +30 -2
- package/node_modules/mdast-util-to-markdown/lib/handle/strong.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/strong.js +39 -41
- package/node_modules/mdast-util-to-markdown/lib/handle/text.d.ts +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/text.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/text.js +7 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.d.ts +6 -0
- package/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js +6 -0
- package/node_modules/mdast-util-to-markdown/lib/index.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/index.js +34 -8
- package/node_modules/mdast-util-to-markdown/lib/join.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/join.js +18 -1
- package/node_modules/mdast-util-to-markdown/lib/types.d.ts +50 -30
- package/node_modules/mdast-util-to-markdown/lib/unsafe.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/unsafe.js +15 -1
- package/node_modules/mdast-util-to-markdown/lib/util/character.d.ts +23 -0
- package/node_modules/mdast-util-to-markdown/lib/util/character.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/character.js +32 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-fence.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-fence.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-fence.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-quote.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-quote.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-quote.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-rule.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-strong.d.ts +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/check-strong.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/check-strong.js +4 -0
- package/node_modules/mdast-util-to-markdown/lib/util/compile-pattern.js +3 -1
- package/node_modules/mdast-util-to-markdown/lib/util/container-flow.d.ts +2 -0
- package/node_modules/mdast-util-to-markdown/lib/util/container-flow.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/container-flow.js +9 -0
- package/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.d.ts +95 -4
- package/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js +636 -57
- package/node_modules/mdast-util-to-markdown/lib/util/encode-info.d.ts +2 -2
- package/node_modules/mdast-util-to-markdown/lib/util/encode-info.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/encode-info.js +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.d.ts +5 -0
- package/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js +12 -7
- package/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.d.ts +5 -0
- package/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js +7 -2
- package/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.d.ts +5 -0
- package/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js +20 -15
- package/node_modules/mdast-util-to-markdown/lib/util/html-kind.d.ts +31 -0
- package/node_modules/mdast-util-to-markdown/lib/util/html-kind.d.ts.map +1 -0
- package/node_modules/mdast-util-to-markdown/lib/util/html-kind.js +63 -0
- package/node_modules/mdast-util-to-markdown/lib/util/indent-lines.js +5 -0
- package/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.d.ts +5 -0
- package/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js +11 -0
- package/node_modules/mdast-util-to-markdown/lib/util/safe.d.ts +2 -2
- package/node_modules/mdast-util-to-markdown/lib/util/safe.d.ts.map +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/safe.js +71 -7
- package/node_modules/mdast-util-to-markdown/package.json +13 -57
- package/node_modules/mdast-util-to-markdown/readme.md +139 -84
- package/package.json +21 -21
- package/ui-dist/assets/{AgentAvatar-RxjiAwO8.js → AgentAvatar-PT82VwmU.js} +1 -1
- package/ui-dist/assets/{AgentIdentity-D4BY0hNL.js → AgentIdentity-MCshmbhZ.js} +1 -1
- package/ui-dist/assets/{Agents.production-gcp98JXS.js → Agents.production-BZi6klJA.js} +2 -2
- package/ui-dist/assets/{CompanyActivity.production-CWlPErYS.js → CompanyActivity.production-hUjwDlzb.js} +1 -1
- package/ui-dist/assets/{CompanyExport-JunkVVGm.js → CompanyExport-BQmo7amJ.js} +1 -1
- package/ui-dist/assets/{CompanySkills.production-DvSrjYfs.js → CompanySkills.production-HqWy0fEs.js} +1 -1
- package/ui-dist/assets/{Costs.production-zx6HrqRG.js → Costs.production-CdRBCdli.js} +1 -1
- package/ui-dist/assets/{EmptyState-DfjPe-d3.js → EmptyState-DPcc0zYh.js} +1 -1
- package/ui-dist/assets/{MarkdownBody-CsD5-bu_.js → MarkdownBody-D0eCfSWN.js} +1 -1
- package/ui-dist/assets/{MarkdownEditor-p2rnT0Be.js → MarkdownEditor-Pip4OXiJ.js} +49 -49
- package/ui-dist/assets/{OrgChart.production-C-wrmuDn.js → OrgChart.production-C_I93OQO.js} +1 -1
- package/ui-dist/assets/{PageSkeleton-CFPaR2xk.js → PageSkeleton-DHjTwRT3.js} +1 -1
- package/ui-dist/assets/{RoutineDetail.production-Skb6CK8y.js → RoutineDetail.production-BF19HlVi.js} +1 -1
- package/ui-dist/assets/{RoutineRunVariablesDialog-BWeOhxiO.js → RoutineRunVariablesDialog-IRX4TLng.js} +1 -1
- package/ui-dist/assets/{Routines.production-TpFNwHyG.js → Routines.production-BN-xoFb_.js} +1 -1
- package/ui-dist/assets/{SidebarContext-bqQ25oRc.js → SidebarContext-D01pu4wh.js} +1 -1
- package/ui-dist/assets/{StatusIcon-BJoaLFpW.js → StatusIcon-BuUYMqqU.js} +1 -1
- package/ui-dist/assets/{agents-D79f8ubB.js → agents-BlSzFh-1.js} +1 -1
- package/ui-dist/assets/{badge-Dtq5g7E6.js → badge-Cf7ihb3q.js} +1 -1
- package/ui-dist/assets/{bot-CuAIZ3O7.js → bot-DZDpMzjD.js} +1 -1
- package/ui-dist/assets/{button-BvVFpN4P.js → button-CAPbz11u.js} +1 -1
- package/ui-dist/assets/{card-Dt_3k83X.js → card-dmVcp3AX.js} +1 -1
- package/ui-dist/assets/{check-IIwgETIo.js → check-DDiXDm2i.js} +1 -1
- package/ui-dist/assets/{checkbox-Dt_GoRUY.js → checkbox-CmMbs2PZ.js} +1 -1
- package/ui-dist/assets/{chevron-down-UBZnuvt1.js → chevron-down-F9aZv-V7.js} +1 -1
- package/ui-dist/assets/{chevron-right-B0AHub3v.js → chevron-right-B9JUOr38.js} +1 -1
- package/ui-dist/assets/{clipboard-Bj5QAqRq.js → clipboard-CYJ5Q78m.js} +1 -1
- package/ui-dist/assets/{company-members-DEqvhrMC.js → company-members-BcZm1g8Q.js} +1 -1
- package/ui-dist/assets/createLucideIcon-r3v6fbGz.js +92 -0
- package/ui-dist/assets/{definition-wrbKkF1t.js → definition-Ds8jy0r3.js} +1 -1
- package/ui-dist/assets/{dist-FWFKwYyU.js → dist-5v80Jc6A.js} +1 -1
- package/ui-dist/assets/{dist-VxTJitj7.js → dist-D1zgkcBw.js} +1 -1
- package/ui-dist/assets/{environments-CkEnfa1n.js → environments-BVeNFanj.js} +1 -1
- package/ui-dist/assets/{external-link-B35J81lc.js → external-link-0lrOvZWO.js} +1 -1
- package/ui-dist/assets/{file-text-CD47Bznz.js → file-text-C9vgFckt.js} +1 -1
- package/ui-dist/assets/{health-CfAQPRgq.js → health-DeeeogeJ.js} +1 -1
- package/ui-dist/assets/{heartbeats-DLceYe5K.js → heartbeats-CK_aXmx5.js} +1 -1
- package/ui-dist/assets/{index-qzns_tVc.js → index-zttiya6r.js} +153 -153
- package/ui-dist/assets/{input-CFI8T_fr.js → input-DpsS9it-.js} +1 -1
- package/ui-dist/assets/{label-JgSsn_gH.js → label-C2ddSDJj.js} +1 -1
- package/ui-dist/assets/{loader-circle-AYbv_YhN.js → loader-circle-BD9wx-lw.js} +1 -1
- package/ui-dist/assets/{mention-chips-DPVE_n2N.js → mention-chips-DXumPrOR.js} +1 -1
- package/ui-dist/assets/{octagon-alert-2PgnRbAG.js → octagon-alert-rGMwyrWA.js} +1 -1
- package/ui-dist/assets/{rotate-ccw-D72kg6zn.js → rotate-ccw-CRAQ3Xng.js} +1 -1
- package/ui-dist/assets/{router-BrCMx2mP.js → router-DyZkoSkG.js} +2 -2
- package/ui-dist/assets/{save-fTBYxOC9.js → save-DUnPDT6R.js} +1 -1
- package/ui-dist/assets/{select-BidMsZcD.js → select-mS22eY6T.js} +1 -1
- package/ui-dist/assets/{sheet-BAx2-UjA.js → sheet-DeCxNmfl.js} +1 -1
- package/ui-dist/assets/{skeleton-CYELISHD.js → skeleton-CKir8TUW.js} +1 -1
- package/ui-dist/assets/{tabs-D5oWPScx.js → tabs-DWRZjksg.js} +1 -1
- package/ui-dist/assets/{triangle-alert-DFzcyeFH.js → triangle-alert-CgJcxSQX.js} +1 -1
- package/ui-dist/assets/{use-adapter-capabilities-aPQHbB6R.js → use-adapter-capabilities-BiWYK4zJ.js} +1 -1
- package/ui-dist/assets/{useHiddenSettings-jRtbaks6.js → useHiddenSettings-2JpxuJV7.js} +1 -1
- package/ui-dist/assets/{zap-B3DNfTNV.js → zap-P-cXfK28.js} +1 -1
- package/ui-dist/index.html +45 -45
- package/ui-dist/sw.js +1 -1
- package/node_modules/mdast-util-to-markdown/lib/util/emphasis-strong-marker.d.ts +0 -7
- package/node_modules/mdast-util-to-markdown/lib/util/emphasis-strong-marker.d.ts.map +0 -1
- package/ui-dist/assets/createLucideIcon-eTR0JqwS.js +0 -92
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
* Code point on the outer side of the run.
|
|
22
22
|
* @param {number} inside
|
|
23
23
|
* Code point on the inner side of the run.
|
|
24
|
-
* @param {
|
|
24
|
+
* @param {string} marker
|
|
25
25
|
* Marker of the run.
|
|
26
26
|
* Underscores are handled more strictly (they form less often) than
|
|
27
27
|
* asterisks.
|
|
28
28
|
* @returns {EncodeSides}
|
|
29
29
|
* Whether to encode characters.
|
|
30
30
|
*/
|
|
31
|
-
export function encodeInfo(outside: number, inside: number, marker:
|
|
31
|
+
export function encodeInfo(outside: number, inside: number, marker: string): EncodeSides;
|
|
32
32
|
import type { EncodeSides } from '../types.js';
|
|
33
33
|
//# sourceMappingURL=encode-info.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encode-info.d.ts","sourceRoot":"","sources":["encode-info.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAKH,oCAfW,MAAM,UAEN,MAAM,UAEN,
|
|
1
|
+
{"version":3,"file":"encode-info.d.ts","sourceRoot":"","sources":["encode-info.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAKH,oCAfW,MAAM,UAEN,MAAM,UAEN,MAAM,GAIJ,WAAW,CAgDvB;iCAhF6B,aAAa"}
|
|
@@ -27,7 +27,7 @@ import {classifyCharacter} from 'micromark-util-classify-character'
|
|
|
27
27
|
* Code point on the outer side of the run.
|
|
28
28
|
* @param {number} inside
|
|
29
29
|
* Code point on the inner side of the run.
|
|
30
|
-
* @param {
|
|
30
|
+
* @param {string} marker
|
|
31
31
|
* Marker of the run.
|
|
32
32
|
* Underscores are handled more strictly (they form less often) than
|
|
33
33
|
* asterisks.
|
|
@@ -3,9 +3,14 @@
|
|
|
3
3
|
* @import {Code} from 'mdast'
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
+
* Checks if a code block can be formatted as an indented code block.
|
|
7
|
+
*
|
|
6
8
|
* @param {Code} node
|
|
9
|
+
* Node to check.
|
|
7
10
|
* @param {State} state
|
|
11
|
+
* Info passed around.
|
|
8
12
|
* @returns {boolean}
|
|
13
|
+
* Whether the code can be formatted as an indented code block.
|
|
9
14
|
*/
|
|
10
15
|
export function formatCodeAsIndented(node: Code, state: State): boolean;
|
|
11
16
|
import type { Code } from 'mdast';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-code-as-indented.d.ts","sourceRoot":"","sources":["format-code-as-indented.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH
|
|
1
|
+
{"version":3,"file":"format-code-as-indented.d.ts","sourceRoot":"","sources":["format-code-as-indented.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;GASG;AACH,2CAPW,IAAI,SAEJ,KAAK,GAEH,OAAO,CAcnB;0BAxBsB,OAAO;2BADN,wBAAwB"}
|
|
@@ -4,19 +4,24 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
+
* Checks if a code block can be formatted as an indented code block.
|
|
8
|
+
*
|
|
7
9
|
* @param {Code} node
|
|
10
|
+
* Node to check.
|
|
8
11
|
* @param {State} state
|
|
12
|
+
* Info passed around.
|
|
9
13
|
* @returns {boolean}
|
|
14
|
+
* Whether the code can be formatted as an indented code block.
|
|
10
15
|
*/
|
|
11
16
|
export function formatCodeAsIndented(node, state) {
|
|
12
17
|
return Boolean(
|
|
13
18
|
state.options.fences === false &&
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
node.value &&
|
|
20
|
+
// If there’s no info…
|
|
21
|
+
!node.lang &&
|
|
22
|
+
// And there’s a non-whitespace character…
|
|
23
|
+
/[^\n\r ]/.test(node.value) &&
|
|
24
|
+
// And the value doesn’t start or end in a blank…
|
|
25
|
+
!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(node.value)
|
|
21
26
|
)
|
|
22
27
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* Checks if a heading can be formatted as a setext heading.
|
|
3
|
+
*
|
|
2
4
|
* @param {Heading} node
|
|
5
|
+
* Node to check.
|
|
3
6
|
* @param {State} state
|
|
7
|
+
* Info passed around.
|
|
4
8
|
* @returns {boolean}
|
|
9
|
+
* Whether the heading can be formatted as a setext heading.
|
|
5
10
|
*/
|
|
6
11
|
export function formatHeadingAsSetext(node: Heading, state: State): boolean;
|
|
7
12
|
import type { Heading } from 'mdast';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-heading-as-setext.d.ts","sourceRoot":"","sources":["format-heading-as-setext.js"],"names":[],"mappings":"AAQA
|
|
1
|
+
{"version":3,"file":"format-heading-as-setext.d.ts","sourceRoot":"","sources":["format-heading-as-setext.js"],"names":[],"mappings":"AAQA;;;;;;;;;GASG;AACH,4CAPW,OAAO,SAEP,KAAK,GAEH,OAAO,CAuBnB;6BApCyB,OAAO;2BADT,wBAAwB"}
|
|
@@ -7,9 +7,14 @@ import {EXIT, visit} from 'unist-util-visit'
|
|
|
7
7
|
import {toString} from 'mdast-util-to-string'
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
+
* Checks if a heading can be formatted as a setext heading.
|
|
11
|
+
*
|
|
10
12
|
* @param {Heading} node
|
|
13
|
+
* Node to check.
|
|
11
14
|
* @param {State} state
|
|
15
|
+
* Info passed around.
|
|
12
16
|
* @returns {boolean}
|
|
17
|
+
* Whether the heading can be formatted as a setext heading.
|
|
13
18
|
*/
|
|
14
19
|
export function formatHeadingAsSetext(node, state) {
|
|
15
20
|
let literalWithBreak = false
|
|
@@ -28,7 +33,7 @@ export function formatHeadingAsSetext(node, state) {
|
|
|
28
33
|
|
|
29
34
|
return Boolean(
|
|
30
35
|
(!node.depth || node.depth < 3) &&
|
|
31
|
-
|
|
32
|
-
|
|
36
|
+
toString(node) &&
|
|
37
|
+
(state.options.setext || literalWithBreak)
|
|
33
38
|
)
|
|
34
39
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* Checks if a link can be formatted as an autolink.
|
|
3
|
+
*
|
|
2
4
|
* @param {Link} node
|
|
5
|
+
* Node to check.
|
|
3
6
|
* @param {State} state
|
|
7
|
+
* Info passed around.
|
|
4
8
|
* @returns {boolean}
|
|
9
|
+
* Whether the link can be formatted as an autolink.
|
|
5
10
|
*/
|
|
6
11
|
export function formatLinkAsAutolink(node: Link, state: State): boolean;
|
|
7
12
|
import type { Link } from 'mdast';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-link-as-autolink.d.ts","sourceRoot":"","sources":["format-link-as-autolink.js"],"names":[],"mappings":"AAOA
|
|
1
|
+
{"version":3,"file":"format-link-as-autolink.d.ts","sourceRoot":"","sources":["format-link-as-autolink.js"],"names":[],"mappings":"AAOA;;;;;;;;;GASG;AACH,2CAPW,IAAI,SAEJ,KAAK,GAEH,OAAO,CAwBnB;0BApCsB,OAAO;2BADN,wBAAwB"}
|
|
@@ -6,29 +6,34 @@
|
|
|
6
6
|
import {toString} from 'mdast-util-to-string'
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
+
* Checks if a link can be formatted as an autolink.
|
|
10
|
+
*
|
|
9
11
|
* @param {Link} node
|
|
12
|
+
* Node to check.
|
|
10
13
|
* @param {State} state
|
|
14
|
+
* Info passed around.
|
|
11
15
|
* @returns {boolean}
|
|
16
|
+
* Whether the link can be formatted as an autolink.
|
|
12
17
|
*/
|
|
13
18
|
export function formatLinkAsAutolink(node, state) {
|
|
14
19
|
const raw = toString(node)
|
|
15
20
|
|
|
16
21
|
return Boolean(
|
|
17
22
|
!state.options.resourceLink &&
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
// If there’s a url…
|
|
24
|
+
node.url &&
|
|
25
|
+
// And there’s no title…
|
|
26
|
+
!node.title &&
|
|
27
|
+
// And the content of `node` is a single text node…
|
|
28
|
+
node.children &&
|
|
29
|
+
node.children.length === 1 &&
|
|
30
|
+
node.children[0].type === 'text' &&
|
|
31
|
+
// And if the url is the same as the content…
|
|
32
|
+
(raw === node.url || 'mailto:' + raw === node.url) &&
|
|
33
|
+
// And that starts w/ a protocol…
|
|
34
|
+
/^[a-z][+\-.a-z]+:/i.test(node.url) &&
|
|
35
|
+
// And that doesn’t contain ASCII control codes (character escapes and
|
|
36
|
+
// references don’t work), space, or angle brackets…
|
|
37
|
+
!/[\0- <>\u007F]/.test(node.url)
|
|
33
38
|
)
|
|
34
39
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {1 | 2 | 3 | 4 | 5 | 6 | 7} Kind
|
|
3
|
+
* Kind of HTML (flow) element.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Infer the kind of HTML that `value` is.
|
|
7
|
+
*
|
|
8
|
+
* This works on valid trees as produced by `micromark`.
|
|
9
|
+
* Kinds:
|
|
10
|
+
*
|
|
11
|
+
* 1. raw
|
|
12
|
+
* 2. comment
|
|
13
|
+
* 3. instruction
|
|
14
|
+
* 4. declaration
|
|
15
|
+
* 5. cdata
|
|
16
|
+
* 6. block
|
|
17
|
+
* 7. other
|
|
18
|
+
*
|
|
19
|
+
* See: <https://spec.commonmark.org/0.31.2/#html-blocks>.
|
|
20
|
+
*
|
|
21
|
+
* @param {string} value
|
|
22
|
+
* HTML.
|
|
23
|
+
* @returns {Kind | undefined}
|
|
24
|
+
* Kind; `undefined` if unknown.
|
|
25
|
+
*/
|
|
26
|
+
export function htmlKind(value: string): Kind | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Kind of HTML (flow) element.
|
|
29
|
+
*/
|
|
30
|
+
export type Kind = 1 | 2 | 3 | 4 | 5 | 6 | 7;
|
|
31
|
+
//# sourceMappingURL=html-kind.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html-kind.d.ts","sourceRoot":"","sources":["html-kind.js"],"names":[],"mappings":"AAGA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,gCALW,MAAM,GAEJ,IAAI,GAAG,SAAS,CAoC5B;;;;mBA1DY,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {asciiAlpha, asciiAlphanumeric} from 'micromark-util-character'
|
|
2
|
+
import {htmlBlockNames, htmlRawNames} from 'micromark-util-html-tag-name'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @typedef {1 | 2 | 3 | 4 | 5 | 6 | 7} Kind
|
|
6
|
+
* Kind of HTML (flow) element.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Infer the kind of HTML that `value` is.
|
|
11
|
+
*
|
|
12
|
+
* This works on valid trees as produced by `micromark`.
|
|
13
|
+
* Kinds:
|
|
14
|
+
*
|
|
15
|
+
* 1. raw
|
|
16
|
+
* 2. comment
|
|
17
|
+
* 3. instruction
|
|
18
|
+
* 4. declaration
|
|
19
|
+
* 5. cdata
|
|
20
|
+
* 6. block
|
|
21
|
+
* 7. other
|
|
22
|
+
*
|
|
23
|
+
* See: <https://spec.commonmark.org/0.31.2/#html-blocks>.
|
|
24
|
+
*
|
|
25
|
+
* @param {string} value
|
|
26
|
+
* HTML.
|
|
27
|
+
* @returns {Kind | undefined}
|
|
28
|
+
* Kind; `undefined` if unknown.
|
|
29
|
+
*/
|
|
30
|
+
export function htmlKind(value) {
|
|
31
|
+
if (value.charCodeAt(0) !== 60 /* `<` */) return
|
|
32
|
+
|
|
33
|
+
const next = value.charCodeAt(1)
|
|
34
|
+
|
|
35
|
+
if (next === 33 /* `!` */) {
|
|
36
|
+
const code = value.charCodeAt(2)
|
|
37
|
+
if (code === 45 /* `-` */) return 2
|
|
38
|
+
if (code === 91 /* `[` */) return 5
|
|
39
|
+
if (asciiAlpha(code)) return 4
|
|
40
|
+
return
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (next === 63 /* `?` */) return 3
|
|
44
|
+
|
|
45
|
+
const closing = next === 47 /* `/` */
|
|
46
|
+
const start = closing ? 2 : 1
|
|
47
|
+
let end = start
|
|
48
|
+
let code = value.charCodeAt(end)
|
|
49
|
+
|
|
50
|
+
if (!asciiAlpha(code)) return
|
|
51
|
+
|
|
52
|
+
while (code === 45 /* `-` */ || asciiAlphanumeric(code)) {
|
|
53
|
+
code = value.charCodeAt(++end)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const name = value.slice(start, end).toLowerCase()
|
|
57
|
+
|
|
58
|
+
if (!closing && code !== 47 /* `/` */ && htmlRawNames.includes(name)) {
|
|
59
|
+
return 1
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return htmlBlockNames.includes(name) ? 6 : 7
|
|
63
|
+
}
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
const eol = /\r?\n|\r/g
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
+
* Indents each line.
|
|
9
|
+
*
|
|
8
10
|
* @type {IndentLines}
|
|
9
11
|
*/
|
|
10
12
|
export function indentLines(value, map) {
|
|
@@ -27,7 +29,10 @@ export function indentLines(value, map) {
|
|
|
27
29
|
return result.join('')
|
|
28
30
|
|
|
29
31
|
/**
|
|
32
|
+
* Indents a single line.
|
|
33
|
+
*
|
|
30
34
|
* @param {string} value
|
|
35
|
+
* Line.
|
|
31
36
|
*/
|
|
32
37
|
function one(value) {
|
|
33
38
|
result.push(map(value, line, !value))
|
|
@@ -2,9 +2,14 @@
|
|
|
2
2
|
* @import {ConstructName, Unsafe} from 'mdast-util-to-markdown'
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
+
* Check if a pattern is in scope based on the current stack of constructs.
|
|
6
|
+
*
|
|
5
7
|
* @param {Array<ConstructName>} stack
|
|
8
|
+
* Current stack of constructs.
|
|
6
9
|
* @param {Unsafe} pattern
|
|
10
|
+
* Pattern to check.
|
|
7
11
|
* @returns {boolean}
|
|
12
|
+
* Whether the pattern is in scope.
|
|
8
13
|
*/
|
|
9
14
|
export function patternInScope(stack: Array<ConstructName>, pattern: Unsafe): boolean;
|
|
10
15
|
import type { ConstructName } from 'mdast-util-to-markdown';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pattern-in-scope.d.ts","sourceRoot":"","sources":["pattern-in-scope.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH
|
|
1
|
+
{"version":3,"file":"pattern-in-scope.d.ts","sourceRoot":"","sources":["pattern-in-scope.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;GASG;AACH,sCAPW,KAAK,CAAC,aAAa,CAAC,WAEpB,MAAM,GAEJ,OAAO,CAQnB;mCAlBuC,wBAAwB;4BAAxB,wBAAwB"}
|
|
@@ -3,9 +3,14 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
+
* Check if a pattern is in scope based on the current stack of constructs.
|
|
7
|
+
*
|
|
6
8
|
* @param {Array<ConstructName>} stack
|
|
9
|
+
* Current stack of constructs.
|
|
7
10
|
* @param {Unsafe} pattern
|
|
11
|
+
* Pattern to check.
|
|
8
12
|
* @returns {boolean}
|
|
13
|
+
* Whether the pattern is in scope.
|
|
9
14
|
*/
|
|
10
15
|
export function patternInScope(stack, pattern) {
|
|
11
16
|
return (
|
|
@@ -15,10 +20,16 @@ export function patternInScope(stack, pattern) {
|
|
|
15
20
|
}
|
|
16
21
|
|
|
17
22
|
/**
|
|
23
|
+
* Check if any of the constructs in the list are present in the stack.
|
|
24
|
+
*
|
|
18
25
|
* @param {Array<ConstructName>} stack
|
|
26
|
+
* Current stack of constructs.
|
|
19
27
|
* @param {Unsafe['inConstruct']} list
|
|
28
|
+
* List of constructs to check for in the stack.
|
|
20
29
|
* @param {boolean} none
|
|
30
|
+
* Value to return if the list is empty or not provided.
|
|
21
31
|
* @returns {boolean}
|
|
32
|
+
* Whether any of the constructs in the list are present in the stack.
|
|
22
33
|
*/
|
|
23
34
|
function listInScope(stack, list, none) {
|
|
24
35
|
if (typeof list === 'string') {
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
*
|
|
9
9
|
* To solve this, `mdast-util-to-markdown` tracks:
|
|
10
10
|
*
|
|
11
|
-
* *
|
|
12
|
-
* *
|
|
11
|
+
* * characters before and after something;
|
|
12
|
+
* * what “constructs” we are in.
|
|
13
13
|
*
|
|
14
14
|
* This information is then used by this function to escape or encode
|
|
15
15
|
* special characters.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"safe.d.ts","sourceRoot":"","sources":["safe.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"safe.d.ts","sourceRoot":"","sources":["safe.js"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,4BATW,KAAK,SAEL,MAAM,GAAG,IAAI,GAAG,SAAS,UAEzB,UAAU,GAER,MAAM,CAuJlB;2BAtLmC,wBAAwB;gCAAxB,wBAAwB"}
|
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
* @import {SafeConfig, State} from 'mdast-util-to-markdown'
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import {classifyCharacter} from 'micromark-util-classify-character'
|
|
5
6
|
import {encodeCharacterReference} from './encode-character-reference.js'
|
|
6
7
|
import {patternInScope} from './pattern-in-scope.js'
|
|
7
8
|
|
|
9
|
+
const own = {}.hasOwnProperty
|
|
10
|
+
|
|
8
11
|
/**
|
|
9
12
|
* Make a string safe for embedding in markdown constructs.
|
|
10
13
|
*
|
|
@@ -15,8 +18,8 @@ import {patternInScope} from './pattern-in-scope.js'
|
|
|
15
18
|
*
|
|
16
19
|
* To solve this, `mdast-util-to-markdown` tracks:
|
|
17
20
|
*
|
|
18
|
-
* *
|
|
19
|
-
* *
|
|
21
|
+
* * characters before and after something;
|
|
22
|
+
* * what “constructs” we are in.
|
|
20
23
|
*
|
|
21
24
|
* This information is then used by this function to escape or encode
|
|
22
25
|
* special characters.
|
|
@@ -38,6 +41,9 @@ export function safe(state, input, config) {
|
|
|
38
41
|
const result = []
|
|
39
42
|
/** @type {Record<number, {before: boolean, after: boolean}>} */
|
|
40
43
|
const infos = {}
|
|
44
|
+
// Character escapes and references do not work in autolinks, so
|
|
45
|
+
// percent-encoding is used instead.
|
|
46
|
+
const percentEncode = state.stack.includes('autolink')
|
|
41
47
|
let index = -1
|
|
42
48
|
|
|
43
49
|
while (++index < state.unsafe.length) {
|
|
@@ -56,7 +62,7 @@ export function safe(state, input, config) {
|
|
|
56
62
|
const after = 'after' in pattern
|
|
57
63
|
const position = match.index + (before ? match[1].length : 0)
|
|
58
64
|
|
|
59
|
-
if (
|
|
65
|
+
if (own.call(infos, position)) {
|
|
60
66
|
if (infos[position].before && !before) {
|
|
61
67
|
infos[position].before = false
|
|
62
68
|
}
|
|
@@ -73,8 +79,9 @@ export function safe(state, input, config) {
|
|
|
73
79
|
|
|
74
80
|
positions.sort(numerical)
|
|
75
81
|
|
|
76
|
-
|
|
82
|
+
const offset = config.before ? config.before.length : 0
|
|
77
83
|
const end = value.length - (config.after ? config.after.length : 0)
|
|
84
|
+
let start = offset
|
|
78
85
|
index = -1
|
|
79
86
|
|
|
80
87
|
while (++index < positions.length) {
|
|
@@ -85,6 +92,44 @@ export function safe(state, input, config) {
|
|
|
85
92
|
continue
|
|
86
93
|
}
|
|
87
94
|
|
|
95
|
+
// Special handling for “intraword” underscores (`a_b`, `a__b`).
|
|
96
|
+
// Those are different from asterisks in forming attention.
|
|
97
|
+
// Note that `a _ b` also cannot form but not escaping it is very complex,
|
|
98
|
+
// so that’s not handled.
|
|
99
|
+
if (
|
|
100
|
+
value.charAt(position) === '_' &&
|
|
101
|
+
// Preceded by an unescaped character that is not punctuation or whitespace:
|
|
102
|
+
position > 0 &&
|
|
103
|
+
classifyCharacter(value.charCodeAt(position - 1)) === undefined &&
|
|
104
|
+
!own.call(infos, position - 1) &&
|
|
105
|
+
// Characters next to attention markers can become character references
|
|
106
|
+
// later, turning `a` into `a`, so those do not count.
|
|
107
|
+
!(position - 1 === offset && /[*_]/.test(value.charAt(offset - 1)))
|
|
108
|
+
) {
|
|
109
|
+
let sequenceEnd = position + 1
|
|
110
|
+
|
|
111
|
+
// Look for the whole run.
|
|
112
|
+
while (sequenceEnd < end && value.charAt(sequenceEnd) === '_') {
|
|
113
|
+
sequenceEnd++
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const skip = sequenceEnd - position - 1
|
|
117
|
+
|
|
118
|
+
if (
|
|
119
|
+
// All underscores in the run are unsafe positions, so they can be
|
|
120
|
+
// skipped.
|
|
121
|
+
positions[index + skip] === sequenceEnd - 1 &&
|
|
122
|
+
// Rest as above.
|
|
123
|
+
sequenceEnd < value.length &&
|
|
124
|
+
classifyCharacter(value.charCodeAt(sequenceEnd)) === undefined &&
|
|
125
|
+
!own.call(infos, sequenceEnd) &&
|
|
126
|
+
!(sequenceEnd === end - 1 && /[*_]/.test(value.charAt(end)))
|
|
127
|
+
) {
|
|
128
|
+
index += skip
|
|
129
|
+
continue
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
88
133
|
// If this character is supposed to be escaped because it has a condition on
|
|
89
134
|
// the next character, and the next character is definitly being escaped,
|
|
90
135
|
// then skip this escape.
|
|
@@ -103,15 +148,23 @@ export function safe(state, input, config) {
|
|
|
103
148
|
}
|
|
104
149
|
|
|
105
150
|
if (start !== position) {
|
|
151
|
+
const slice = value.slice(start, position)
|
|
106
152
|
// If we have to use a character reference, an ampersand would be more
|
|
107
153
|
// correct, but as backslashes only care about punctuation, either will
|
|
108
154
|
// do the trick
|
|
109
|
-
result.push(escapeBackslashes(
|
|
155
|
+
result.push(percentEncode ? slice : escapeBackslashes(slice, '\\'))
|
|
110
156
|
}
|
|
111
157
|
|
|
112
158
|
start = position
|
|
113
159
|
|
|
114
|
-
|
|
160
|
+
// Percent-encoding such as `%20`.
|
|
161
|
+
if (percentEncode) {
|
|
162
|
+
result.push(
|
|
163
|
+
'%' +
|
|
164
|
+
value.charCodeAt(position).toString(16).toUpperCase().padStart(2, '0')
|
|
165
|
+
)
|
|
166
|
+
start++
|
|
167
|
+
} else if (
|
|
115
168
|
/[!-/:-@[-`{-~]/.test(value.charAt(position)) &&
|
|
116
169
|
(!config.encode || !config.encode.includes(value.charAt(position)))
|
|
117
170
|
) {
|
|
@@ -124,24 +177,35 @@ export function safe(state, input, config) {
|
|
|
124
177
|
}
|
|
125
178
|
}
|
|
126
179
|
|
|
127
|
-
|
|
180
|
+
const rest = value.slice(start, end)
|
|
181
|
+
result.push(percentEncode ? rest : escapeBackslashes(rest, config.after))
|
|
128
182
|
|
|
129
183
|
return result.join('')
|
|
130
184
|
}
|
|
131
185
|
|
|
132
186
|
/**
|
|
187
|
+
* Compare two numbers.
|
|
188
|
+
*
|
|
133
189
|
* @param {number} a
|
|
190
|
+
* Number.
|
|
134
191
|
* @param {number} b
|
|
192
|
+
* Other number.
|
|
135
193
|
* @returns {number}
|
|
194
|
+
* Result.
|
|
136
195
|
*/
|
|
137
196
|
function numerical(a, b) {
|
|
138
197
|
return a - b
|
|
139
198
|
}
|
|
140
199
|
|
|
141
200
|
/**
|
|
201
|
+
* Escape backslashes in a string, considering characters that follow.
|
|
202
|
+
*
|
|
142
203
|
* @param {string} value
|
|
204
|
+
* Value.
|
|
143
205
|
* @param {string} after
|
|
206
|
+
* Characters that follow the value.
|
|
144
207
|
* @returns {string}
|
|
208
|
+
* Escaped string.
|
|
145
209
|
*/
|
|
146
210
|
function escapeBackslashes(value, after) {
|
|
147
211
|
const expression = /\\(?=[!-/:-@[-`{-~])/g
|
|
@@ -10,29 +10,31 @@
|
|
|
10
10
|
"longest-streak": "^3.0.0",
|
|
11
11
|
"mdast-util-phrasing": "^4.0.0",
|
|
12
12
|
"mdast-util-to-string": "^4.0.0",
|
|
13
|
+
"micromark-util-character": "^2.0.0",
|
|
13
14
|
"micromark-util-classify-character": "^2.0.0",
|
|
14
15
|
"micromark-util-decode-string": "^2.0.0",
|
|
16
|
+
"micromark-util-html-tag-name": "^2.0.0",
|
|
15
17
|
"unist-util-visit": "^5.0.0",
|
|
16
18
|
"zwitch": "^2.0.0"
|
|
17
19
|
},
|
|
18
20
|
"description": "mdast utility to serialize markdown",
|
|
19
21
|
"devDependencies": {
|
|
20
|
-
"@types/node": "^
|
|
21
|
-
"c8": "^
|
|
22
|
+
"@types/node": "^26.0.0",
|
|
23
|
+
"c8": "^12.0.0",
|
|
22
24
|
"mdast-util-from-markdown": "^2.0.0",
|
|
23
25
|
"prettier": "^3.0.0",
|
|
24
26
|
"remark-cli": "^12.0.0",
|
|
25
|
-
"remark-preset-wooorm": "^
|
|
27
|
+
"remark-preset-wooorm": "^11.0.0",
|
|
26
28
|
"type-coverage": "^2.0.0",
|
|
27
|
-
"typescript": "^
|
|
29
|
+
"typescript": "^6.0.0",
|
|
28
30
|
"unist-util-remove-position": "^5.0.0",
|
|
29
|
-
"xo": "^0.
|
|
31
|
+
"xo": "^5.0.0"
|
|
30
32
|
},
|
|
31
33
|
"exports": "./index.js",
|
|
32
34
|
"files": [
|
|
33
|
-
"lib/",
|
|
34
35
|
"index.d.ts",
|
|
35
|
-
"index.js"
|
|
36
|
+
"index.js",
|
|
37
|
+
"lib/"
|
|
36
38
|
],
|
|
37
39
|
"funding": {
|
|
38
40
|
"type": "opencollective",
|
|
@@ -69,64 +71,18 @@
|
|
|
69
71
|
]
|
|
70
72
|
},
|
|
71
73
|
"repository": "syntax-tree/mdast-util-to-markdown",
|
|
72
|
-
"version": "2.1.
|
|
74
|
+
"version": "2.1.3",
|
|
73
75
|
"scripts": {
|
|
74
|
-
"prepack": "npm run build && npm run format",
|
|
75
76
|
"build": "tsc --build --clean && tsc --build && type-coverage",
|
|
76
|
-
"format": "remark
|
|
77
|
+
"format": "remark --frail --output --quiet -- . && prettier --log-level warn --write -- . && xo --fix",
|
|
77
78
|
"test-api": "node --conditions development test/index.js",
|
|
78
|
-
"test-coverage": "c8 --100 --reporter lcov npm run test-api",
|
|
79
|
+
"test-coverage": "c8 --100 --reporter lcov -- npm run test-api",
|
|
79
80
|
"test": "npm run build && npm run format && npm run test-coverage"
|
|
80
81
|
},
|
|
81
82
|
"sideEffects": false,
|
|
82
83
|
"typeCoverage": {
|
|
83
84
|
"atLeast": 100,
|
|
84
|
-
"ignoreFiles": [
|
|
85
|
-
"lib/types.d.ts"
|
|
86
|
-
],
|
|
87
85
|
"strict": true
|
|
88
86
|
},
|
|
89
|
-
"type": "module"
|
|
90
|
-
"xo": {
|
|
91
|
-
"overrides": [
|
|
92
|
-
{
|
|
93
|
-
"files": [
|
|
94
|
-
"**/*.d.ts"
|
|
95
|
-
],
|
|
96
|
-
"rules": {
|
|
97
|
-
"@typescript-eslint/array-type": [
|
|
98
|
-
"error",
|
|
99
|
-
{
|
|
100
|
-
"default": "generic"
|
|
101
|
-
}
|
|
102
|
-
],
|
|
103
|
-
"@typescript-eslint/ban-types": [
|
|
104
|
-
"error",
|
|
105
|
-
{
|
|
106
|
-
"extendDefaults": true
|
|
107
|
-
}
|
|
108
|
-
],
|
|
109
|
-
"@typescript-eslint/consistent-type-definitions": [
|
|
110
|
-
"error",
|
|
111
|
-
"interface"
|
|
112
|
-
]
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
"files": [
|
|
117
|
-
"test/**/*.js"
|
|
118
|
-
],
|
|
119
|
-
"rules": {
|
|
120
|
-
"max-depth": "off",
|
|
121
|
-
"no-await-in-loop": "off"
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
],
|
|
125
|
-
"prettier": true,
|
|
126
|
-
"rules": {
|
|
127
|
-
"complexity": "off",
|
|
128
|
-
"unicorn/prefer-at": "off",
|
|
129
|
-
"unicorn/prefer-code-point": "off"
|
|
130
|
-
}
|
|
131
|
-
}
|
|
87
|
+
"type": "module"
|
|
132
88
|
}
|