@openclaw/matrix 2026.5.27 → 2026.5.28-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.js +4 -4
- package/dist/{approval-handler.runtime-D2nZfRw6.js → approval-handler.runtime-DluqYmxg.js} +7 -37
- package/dist/{approval-ids-DzBw_AG3.js → approval-ids-CFZrzmvI.js} +1 -1
- package/dist/{approval-reaction-auth-BvK3dXMH.js → approval-reaction-auth-D0qxpl_o.js} +2 -2
- package/dist/{channel-BLuA_9If.js → channel-NWX4upHC.js} +15 -15
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-CCAsyp75.js → channel.runtime-Bj0ZZFxY.js} +7 -7
- package/dist/{cli-Bo50M7l4.js → cli-CLRLY_-i.js} +15 -14
- package/dist/{cli-metadata-CqUHNx_0.js → cli-metadata-3lBoQ4Zu.js} +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/{client-QO7vDxm0.js → client-DMLL7BD3.js} +2 -2
- package/dist/{client-BgsOzckO.js → client-PgC6QxFp.js} +2 -2
- package/dist/{client-bootstrap-DK9i3KZ5.js → client-bootstrap-DDWICVDG.js} +1 -1
- package/dist/{config-schema-DuSRVdwT.js → config-schema-DLcRkLoI.js} +1 -1
- package/dist/contract-api.js +3 -3
- package/dist/{create-client-hdBEoEIm.js → create-client-DuDqSLm5.js} +2 -2
- package/dist/{crypto-runtime-BcQzS9DV.js → crypto-runtime-DW4yyphN.js} +4 -4
- package/dist/{deps-CAdiytPJ.js → deps-BVWGd2XS.js} +12 -2
- package/dist/{directory-live-2-Vb6nss.js → directory-live-B1uWLPJc.js} +2 -2
- package/dist/{doctor-qLh9PyE4.js → doctor-CENc9ks0.js} +1 -1
- package/dist/{draft-stream-BBVqdEbn.js → draft-stream-CQOHHA1L.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{legacy-crypto-inspector-BRdo-WqV.js → legacy-crypto-inspector-tJOj25VL.js} +1 -1
- package/dist/{logging-BR-gcAjp.js → logging-Bs8MnTq3.js} +2 -9
- package/dist/{matrix-migration.runtime-BhJb4ZII.js → matrix-migration.runtime-CZOep_JX.js} +1 -1
- package/dist/{media-text-C6q1S0AJ.js → media-text-Bl2T_Tej.js} +1 -1
- package/dist/{messages-D-VxmWkC.js → messages-IJd7lTpT.js} +3 -3
- package/dist/{monitor-DO1yiHWm.js → monitor-BtYrCwXE.js} +24 -25
- package/dist/plugin-entry.handlers.runtime.js +1 -1
- package/dist/probe.runtime-DFzGeW9y.js +3 -0
- package/dist/{profile-update-B_LpeC8E.js → profile-update--OKomd5A.js} +2 -2
- package/dist/{reaction-events-BefH3-Gu.js → reaction-events-Cw229qBs.js} +1 -1
- package/dist/recovery-key-store-0i4do66_.js +294 -0
- package/dist/{resolve-targets-BPhBqXyj.js → resolve-targets-DICyeq1_.js} +1 -1
- package/dist/{resolver.runtime-BOS3foyc.js → resolver.runtime-BiecZkY9.js} +1 -1
- package/dist/{runtime-api-B-jlPE4A.js → runtime-api-CsF7Kokd.js} +2 -2
- package/dist/runtime-api.js +1 -1
- package/dist/runtime-heavy-api.js +1 -1
- package/dist/{sdk-BKBZkPKt.js → sdk-Bb6cggYW.js} +8 -303
- package/dist/{send-DivaFHb1.js → send-6c-_Pb_x.js} +1 -1
- package/dist/{setup-bootstrap-ClcP-tDQ.js → setup-bootstrap-DO6nQjiO.js} +2 -2
- package/dist/{setup-core-s8s_Qudu.js → setup-core-CcMpf9nt.js} +1 -1
- package/dist/setup-plugin-api.js +3 -3
- package/dist/{setup-surface-BOt10HNf.js → setup-surface-eTmNGZRP.js} +5 -5
- package/dist/{shared-3K27tl8e.js → shared-cY7hRlYO.js} +111 -4
- package/dist/{thread-bindings-CLjJrThw.js → thread-bindings-LZukDWcn.js} +1 -1
- package/dist/{tool-actions.runtime-Vky1krcK.js → tool-actions.runtime-DmgBERwn.js} +20 -21
- package/dist/{verification-Dar6QON4.js → verification-aUpgCdQU.js} +1 -1
- package/node_modules/linkify-it/build/index.cjs.js +99 -94
- package/node_modules/linkify-it/index.mjs +99 -94
- package/node_modules/linkify-it/package.json +11 -1
- package/node_modules/markdown-it/README.md +13 -17
- package/node_modules/markdown-it/dist/index.cjs.js +111 -31
- package/node_modules/markdown-it/dist/markdown-it.js +117 -31
- package/node_modules/markdown-it/dist/markdown-it.min.js +2 -2
- package/node_modules/markdown-it/lib/common/utils.mjs +30 -1
- package/node_modules/markdown-it/lib/index.mjs +1 -1
- package/node_modules/markdown-it/lib/rules_block/heading.mjs +2 -2
- package/node_modules/markdown-it/lib/rules_block/html_block.mjs +12 -1
- package/node_modules/markdown-it/lib/rules_block/lheading.mjs +4 -1
- package/node_modules/markdown-it/lib/rules_block/paragraph.mjs +3 -1
- package/node_modules/markdown-it/lib/rules_core/smartquotes.mjs +37 -21
- package/node_modules/markdown-it/lib/rules_inline/entity.mjs +2 -2
- package/node_modules/markdown-it/lib/rules_inline/state_inline.mjs +37 -6
- package/node_modules/markdown-it/package.json +14 -3
- package/node_modules/matrix-js-sdk/CHANGELOG.md +7 -0
- package/node_modules/matrix-js-sdk/package.json +1 -1
- package/npm-shrinkwrap.json +35 -15
- package/package.json +6 -6
- package/dist/probe.runtime-9S17Q3Mo.js +0 -3
- package/dist/startup-abort-Bs0Up_Qx.js +0 -109
- package/dist/test-api.js +0 -4
|
@@ -115,11 +115,6 @@ const tlds_2ch_src_re = 'a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghik
|
|
|
115
115
|
// DON'T try to make PRs with changes. Extend TLDs with LinkifyIt.tlds() instead
|
|
116
116
|
const tlds_default = 'biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф'.split('|')
|
|
117
117
|
|
|
118
|
-
function resetScanCache (self) {
|
|
119
|
-
self.__index__ = -1
|
|
120
|
-
self.__text_cache__ = ''
|
|
121
|
-
}
|
|
122
|
-
|
|
123
118
|
function createValidator (re) {
|
|
124
119
|
return function (text, pos) {
|
|
125
120
|
const tail = text.slice(pos)
|
|
@@ -158,8 +153,11 @@ function compile (self) {
|
|
|
158
153
|
function untpl (tpl) { return tpl.replace('%TLDS%', re.src_tlds) }
|
|
159
154
|
|
|
160
155
|
re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i')
|
|
156
|
+
re.email_fuzzy_global = RegExp(untpl(re.tpl_email_fuzzy), 'ig')
|
|
161
157
|
re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i')
|
|
158
|
+
re.link_fuzzy_global = RegExp(untpl(re.tpl_link_fuzzy), 'ig')
|
|
162
159
|
re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i')
|
|
160
|
+
re.link_no_ip_fuzzy_global = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'ig')
|
|
163
161
|
re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i')
|
|
164
162
|
|
|
165
163
|
//
|
|
@@ -253,12 +251,6 @@ function compile (self) {
|
|
|
253
251
|
'(' + self.re.schema_test.source + ')|(' + self.re.host_fuzzy_test.source + ')|@',
|
|
254
252
|
'i'
|
|
255
253
|
)
|
|
256
|
-
|
|
257
|
-
//
|
|
258
|
-
// Cleanup
|
|
259
|
-
//
|
|
260
|
-
|
|
261
|
-
resetScanCache(self)
|
|
262
254
|
}
|
|
263
255
|
|
|
264
256
|
/**
|
|
@@ -266,55 +258,45 @@ function compile (self) {
|
|
|
266
258
|
*
|
|
267
259
|
* Match result. Single element of array, returned by [[LinkifyIt#match]]
|
|
268
260
|
**/
|
|
269
|
-
function Match (
|
|
270
|
-
const
|
|
271
|
-
const end = self.__last_index__
|
|
272
|
-
const text = self.__text_cache__.slice(start, end)
|
|
261
|
+
function Match (text, schema, index, lastIndex) {
|
|
262
|
+
const raw = text.slice(index, lastIndex)
|
|
273
263
|
|
|
274
264
|
/**
|
|
275
265
|
* Match#schema -> String
|
|
276
266
|
*
|
|
277
267
|
* Prefix (protocol) for matched string.
|
|
278
268
|
**/
|
|
279
|
-
this.schema =
|
|
269
|
+
this.schema = schema.toLowerCase()
|
|
280
270
|
/**
|
|
281
271
|
* Match#index -> Number
|
|
282
272
|
*
|
|
283
273
|
* First position of matched string.
|
|
284
274
|
**/
|
|
285
|
-
this.index =
|
|
275
|
+
this.index = index
|
|
286
276
|
/**
|
|
287
277
|
* Match#lastIndex -> Number
|
|
288
278
|
*
|
|
289
279
|
* Next position after matched string.
|
|
290
280
|
**/
|
|
291
|
-
this.lastIndex =
|
|
281
|
+
this.lastIndex = lastIndex
|
|
292
282
|
/**
|
|
293
283
|
* Match#raw -> String
|
|
294
284
|
*
|
|
295
285
|
* Matched string.
|
|
296
286
|
**/
|
|
297
|
-
this.raw =
|
|
287
|
+
this.raw = raw
|
|
298
288
|
/**
|
|
299
289
|
* Match#text -> String
|
|
300
290
|
*
|
|
301
291
|
* Notmalized text of matched string.
|
|
302
292
|
**/
|
|
303
|
-
this.text =
|
|
293
|
+
this.text = raw
|
|
304
294
|
/**
|
|
305
295
|
* Match#url -> String
|
|
306
296
|
*
|
|
307
297
|
* Normalized url of matched string.
|
|
308
298
|
**/
|
|
309
|
-
this.url =
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
function createMatch (self, shift) {
|
|
313
|
-
const match = new Match(self, shift)
|
|
314
|
-
|
|
315
|
-
self.__compiled__[match.schema].normalize(match, self)
|
|
316
|
-
|
|
317
|
-
return match
|
|
299
|
+
this.url = raw
|
|
318
300
|
}
|
|
319
301
|
|
|
320
302
|
/**
|
|
@@ -369,12 +351,6 @@ function LinkifyIt (schemas, options) {
|
|
|
369
351
|
|
|
370
352
|
this.__opts__ = assign({}, defaultOptions, options)
|
|
371
353
|
|
|
372
|
-
// Cache last tested result. Used to skip repeating steps on next `match` call.
|
|
373
|
-
this.__index__ = -1
|
|
374
|
-
this.__last_index__ = -1 // Next scan position
|
|
375
|
-
this.__schema__ = ''
|
|
376
|
-
this.__text_cache__ = ''
|
|
377
|
-
|
|
378
354
|
this.__schemas__ = assign({}, defaultSchemas, schemas)
|
|
379
355
|
this.__compiled__ = {}
|
|
380
356
|
|
|
@@ -416,69 +392,38 @@ LinkifyIt.prototype.set = function set (options) {
|
|
|
416
392
|
* Searches linkifiable pattern and returns `true` on success or `false` on fail.
|
|
417
393
|
**/
|
|
418
394
|
LinkifyIt.prototype.test = function test (text) {
|
|
419
|
-
// Reset scan cache
|
|
420
|
-
this.__text_cache__ = text
|
|
421
|
-
this.__index__ = -1
|
|
422
|
-
|
|
423
395
|
if (!text.length) { return false }
|
|
424
396
|
|
|
425
|
-
let m,
|
|
397
|
+
let m, re
|
|
426
398
|
|
|
427
399
|
// try to scan for link with schema - that's the most simple rule
|
|
428
400
|
if (this.re.schema_test.test(text)) {
|
|
429
401
|
re = this.re.schema_search
|
|
430
402
|
re.lastIndex = 0
|
|
431
403
|
while ((m = re.exec(text)) !== null) {
|
|
432
|
-
|
|
433
|
-
if (len) {
|
|
434
|
-
this.__schema__ = m[2]
|
|
435
|
-
this.__index__ = m.index + m[1].length
|
|
436
|
-
this.__last_index__ = m.index + m[0].length + len
|
|
437
|
-
break
|
|
438
|
-
}
|
|
404
|
+
if (this.testSchemaAt(text, m[2], re.lastIndex)) { return true }
|
|
439
405
|
}
|
|
440
406
|
}
|
|
441
407
|
|
|
442
408
|
if (this.__opts__.fuzzyLink && this.__compiled__['http:']) {
|
|
443
409
|
// guess schemaless links
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
if (this.__index__ < 0 || tld_pos < this.__index__) {
|
|
448
|
-
if ((ml = text.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null) {
|
|
449
|
-
shift = ml.index + ml[1].length
|
|
450
|
-
|
|
451
|
-
if (this.__index__ < 0 || shift < this.__index__) {
|
|
452
|
-
this.__schema__ = ''
|
|
453
|
-
this.__index__ = shift
|
|
454
|
-
this.__last_index__ = ml.index + ml[0].length
|
|
455
|
-
}
|
|
456
|
-
}
|
|
410
|
+
if (text.search(this.re.host_fuzzy_test) >= 0) {
|
|
411
|
+
if (text.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy) !== null) {
|
|
412
|
+
return true
|
|
457
413
|
}
|
|
458
414
|
}
|
|
459
415
|
}
|
|
460
416
|
|
|
461
417
|
if (this.__opts__.fuzzyEmail && this.__compiled__['mailto:']) {
|
|
462
418
|
// guess schemaless emails
|
|
463
|
-
|
|
464
|
-
if (at_pos >= 0) {
|
|
419
|
+
if (text.indexOf('@') >= 0) {
|
|
465
420
|
// We can't skip this check, because this cases are possible:
|
|
466
421
|
// 192.168.1.1@gmail.com, my.in@example.com
|
|
467
|
-
if (
|
|
468
|
-
shift = me.index + me[1].length
|
|
469
|
-
next = me.index + me[0].length
|
|
470
|
-
|
|
471
|
-
if (this.__index__ < 0 || shift < this.__index__ ||
|
|
472
|
-
(shift === this.__index__ && next > this.__last_index__)) {
|
|
473
|
-
this.__schema__ = 'mailto:'
|
|
474
|
-
this.__index__ = shift
|
|
475
|
-
this.__last_index__ = next
|
|
476
|
-
}
|
|
477
|
-
}
|
|
422
|
+
if (text.match(this.re.email_fuzzy) !== null) { return true }
|
|
478
423
|
}
|
|
479
424
|
}
|
|
480
425
|
|
|
481
|
-
return
|
|
426
|
+
return false
|
|
482
427
|
}
|
|
483
428
|
|
|
484
429
|
/**
|
|
@@ -527,23 +472,88 @@ LinkifyIt.prototype.testSchemaAt = function testSchemaAt (text, schema, pos) {
|
|
|
527
472
|
**/
|
|
528
473
|
LinkifyIt.prototype.match = function match (text) {
|
|
529
474
|
const result = []
|
|
530
|
-
|
|
475
|
+
const type_schemed = []
|
|
476
|
+
const type_fuzzy_link = []
|
|
477
|
+
const type_fuzzy_email = []
|
|
478
|
+
let m, len, re
|
|
479
|
+
|
|
480
|
+
function choose (a, b) {
|
|
481
|
+
if (!a) { return b }
|
|
482
|
+
if (!b) { return a }
|
|
483
|
+
if (a.index !== b.index) { return a.index < b.index ? a : b }
|
|
484
|
+
return a.lastIndex >= b.lastIndex ? a : b
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
if (!text.length) { return null }
|
|
488
|
+
|
|
489
|
+
// scan for links with schema
|
|
490
|
+
if (this.re.schema_test.test(text)) {
|
|
491
|
+
re = this.re.schema_search
|
|
492
|
+
re.lastIndex = 0
|
|
493
|
+
while ((m = re.exec(text)) !== null) {
|
|
494
|
+
len = this.testSchemaAt(text, m[2], re.lastIndex)
|
|
495
|
+
if (len) {
|
|
496
|
+
type_schemed.push({
|
|
497
|
+
schema: m[2],
|
|
498
|
+
index: m.index + m[1].length,
|
|
499
|
+
lastIndex: m.index + m[0].length + len
|
|
500
|
+
})
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
}
|
|
531
504
|
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
505
|
+
if (this.__opts__.fuzzyLink && this.__compiled__['http:']) {
|
|
506
|
+
re = this.__opts__.fuzzyIP ? this.re.link_fuzzy_global : this.re.link_no_ip_fuzzy_global
|
|
507
|
+
re.lastIndex = 0
|
|
508
|
+
while ((m = re.exec(text)) !== null) {
|
|
509
|
+
type_fuzzy_link.push({
|
|
510
|
+
schema: '',
|
|
511
|
+
index: m.index + m[1].length,
|
|
512
|
+
lastIndex: m.index + m[0].length
|
|
513
|
+
})
|
|
514
|
+
}
|
|
536
515
|
}
|
|
537
516
|
|
|
538
|
-
|
|
539
|
-
|
|
517
|
+
if (this.__opts__.fuzzyEmail && this.__compiled__['mailto:']) {
|
|
518
|
+
re = this.re.email_fuzzy_global
|
|
519
|
+
re.lastIndex = 0
|
|
520
|
+
while ((m = re.exec(text)) !== null) {
|
|
521
|
+
type_fuzzy_email.push({
|
|
522
|
+
schema: 'mailto:',
|
|
523
|
+
index: m.index + m[1].length,
|
|
524
|
+
lastIndex: m.index + m[0].length
|
|
525
|
+
})
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
const indexes = [0, 0, 0]
|
|
530
|
+
let lastIndex = 0
|
|
531
|
+
|
|
532
|
+
for (;;) {
|
|
533
|
+
const candidates = [
|
|
534
|
+
type_schemed[indexes[0]],
|
|
535
|
+
type_fuzzy_email[indexes[1]],
|
|
536
|
+
type_fuzzy_link[indexes[2]]
|
|
537
|
+
]
|
|
538
|
+
|
|
539
|
+
const candidate = choose(choose(candidates[0], candidates[1]), candidates[2])
|
|
540
540
|
|
|
541
|
-
|
|
542
|
-
while (this.test(tail)) {
|
|
543
|
-
result.push(createMatch(this, shift))
|
|
541
|
+
if (!candidate) { break }
|
|
544
542
|
|
|
545
|
-
|
|
546
|
-
|
|
543
|
+
if (candidate === candidates[0]) {
|
|
544
|
+
indexes[0]++
|
|
545
|
+
} else if (candidate === candidates[1]) {
|
|
546
|
+
indexes[1]++
|
|
547
|
+
} else {
|
|
548
|
+
indexes[2]++
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
if (candidate.index < lastIndex) { continue }
|
|
552
|
+
|
|
553
|
+
const match = new Match(text, candidate.schema, candidate.index, candidate.lastIndex)
|
|
554
|
+
this.__compiled__[match.schema].normalize(match, this)
|
|
555
|
+
result.push(match)
|
|
556
|
+
lastIndex = candidate.lastIndex
|
|
547
557
|
}
|
|
548
558
|
|
|
549
559
|
if (result.length) {
|
|
@@ -560,10 +570,6 @@ LinkifyIt.prototype.match = function match (text) {
|
|
|
560
570
|
* of the string, and null otherwise.
|
|
561
571
|
**/
|
|
562
572
|
LinkifyIt.prototype.matchAtStart = function matchAtStart (text) {
|
|
563
|
-
// Reset scan cache
|
|
564
|
-
this.__text_cache__ = text
|
|
565
|
-
this.__index__ = -1
|
|
566
|
-
|
|
567
573
|
if (!text.length) return null
|
|
568
574
|
|
|
569
575
|
const m = this.re.schema_at_start.exec(text)
|
|
@@ -572,11 +578,10 @@ LinkifyIt.prototype.matchAtStart = function matchAtStart (text) {
|
|
|
572
578
|
const len = this.testSchemaAt(text, m[2], m[0].length)
|
|
573
579
|
if (!len) return null
|
|
574
580
|
|
|
575
|
-
|
|
576
|
-
this.__index__ = m.index + m[1].length
|
|
577
|
-
this.__last_index__ = m.index + m[0].length + len
|
|
581
|
+
const match = new Match(text, m[2], m.index + m[1].length, m.index + m[0].length + len)
|
|
578
582
|
|
|
579
|
-
|
|
583
|
+
this.__compiled__[match.schema].normalize(match, this)
|
|
584
|
+
return match
|
|
580
585
|
}
|
|
581
586
|
|
|
582
587
|
/** chainable
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "linkify-it",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "Links recognition library with FULL unicode support",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"linkify",
|
|
@@ -27,6 +27,16 @@
|
|
|
27
27
|
"build/"
|
|
28
28
|
],
|
|
29
29
|
"license": "MIT",
|
|
30
|
+
"funding": [
|
|
31
|
+
{
|
|
32
|
+
"type": "github",
|
|
33
|
+
"url": "https://github.com/sponsors/puzrin"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"type": "github",
|
|
37
|
+
"url": "https://github.com/sponsors/markdown-it"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
30
40
|
"scripts": {
|
|
31
41
|
"lint": "eslint .",
|
|
32
42
|
"test": "npm run lint && npm run build && c8 --exclude build --exclude test -r text -r html -r lcov mocha",
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
[](https://github.com/markdown-it/markdown-it/actions/workflows/ci.yml)
|
|
4
4
|
[](https://www.npmjs.org/package/markdown-it)
|
|
5
5
|
[](https://coveralls.io/github/markdown-it/markdown-it?branch=master)
|
|
6
|
-
[](https://gitter.im/markdown-it/markdown-it)
|
|
7
6
|
|
|
8
7
|
> Markdown parser done right. Fast and easy to extend.
|
|
9
8
|
|
|
@@ -12,7 +11,7 @@ __[Live demo](https://markdown-it.github.io)__
|
|
|
12
11
|
- Follows the __[CommonMark spec](http://spec.commonmark.org/)__ + adds syntax extensions & sugar (URL autolinking, typographer).
|
|
13
12
|
- Configurable syntax! You can add new rules and even replace existing ones.
|
|
14
13
|
- High speed.
|
|
15
|
-
- [Safe](https://github.com/markdown-it/markdown-it/tree/master/docs/
|
|
14
|
+
- [Safe](https://github.com/markdown-it/markdown-it/tree/master/docs/safety.md) by default.
|
|
16
15
|
- Community-written __[plugins](https://www.npmjs.org/browse/keyword/markdown-it-plugin)__ and [other packages](https://www.npmjs.org/browse/keyword/markdown-it) on npm.
|
|
17
16
|
|
|
18
17
|
__Table of content__
|
|
@@ -28,7 +27,6 @@ __Table of content__
|
|
|
28
27
|
- [Syntax extensions](#syntax-extensions)
|
|
29
28
|
- [Manage rules](#manage-rules)
|
|
30
29
|
- [Benchmark](#benchmark)
|
|
31
|
-
- [markdown-it for enterprise](#markdown-it-for-enterprise)
|
|
32
30
|
- [Authors](#authors)
|
|
33
31
|
- [References / Thanks](#references--thanks)
|
|
34
32
|
|
|
@@ -40,10 +38,13 @@ __Table of content__
|
|
|
40
38
|
npm install markdown-it
|
|
41
39
|
```
|
|
42
40
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
> [!NOTE]
|
|
42
|
+
>
|
|
43
|
+
> For a quick look at `dist/` folder contents, see
|
|
44
|
+
> <https://unpkg.com/markdown-it/>.
|
|
45
|
+
>
|
|
46
|
+
> For browser you can use unpkg.com, esm.sh or any other CDN, wich mirror npm
|
|
47
|
+
> registry
|
|
47
48
|
|
|
48
49
|
|
|
49
50
|
## Usage examples
|
|
@@ -144,7 +145,7 @@ const md = markdownit({
|
|
|
144
145
|
```js
|
|
145
146
|
import markdownit from 'markdown-it'
|
|
146
147
|
|
|
147
|
-
const md = markdownit
|
|
148
|
+
const md = markdownit()
|
|
148
149
|
.use(plugin1)
|
|
149
150
|
.use(plugin2, opts, ...)
|
|
150
151
|
.use(plugin3);
|
|
@@ -281,21 +282,16 @@ Sample: README.md (7774 bytes)
|
|
|
281
282
|
> marked x 1,587 ops/sec ±4.31% (93 runs sampled)
|
|
282
283
|
```
|
|
283
284
|
|
|
284
|
-
|
|
285
|
-
|
|
285
|
+
> [!NOTE]
|
|
286
|
+
>
|
|
287
|
+
> CommonMark version runs with [simplified link normalizers](https://github.com/markdown-it/markdown-it/blob/master/benchmark/implementations/current-commonmark/index.mjs)
|
|
288
|
+
> for more "honest" compare. Difference is ≈1.5×.
|
|
286
289
|
|
|
287
290
|
As you can see, `markdown-it` doesn't pay with speed for its flexibility.
|
|
288
291
|
Slowdown of "full" version caused by additional features not available in
|
|
289
292
|
other implementations.
|
|
290
293
|
|
|
291
294
|
|
|
292
|
-
## markdown-it for enterprise
|
|
293
|
-
|
|
294
|
-
Available as part of the Tidelift Subscription.
|
|
295
|
-
|
|
296
|
-
The maintainers of `markdown-it` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-markdown-it?utm_source=npm-markdown-it&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
|
|
297
|
-
|
|
298
|
-
|
|
299
295
|
## Authors
|
|
300
296
|
|
|
301
297
|
- Alex Kocharin [github/rlidwka](https://github.com/rlidwka)
|