@alexlit/lint-kit 115.0.1 → 115.1.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/package.json +1 -1
- package/packages/config-eslint/package.json +5 -5
- package/packages/config-markdownlint/package.json +3 -3
- package/packages/config-stylelint/package.json +2 -2
- package/packages/config-markdownlint/node_modules/entities/LICENSE +0 -11
- package/packages/config-markdownlint/node_modules/entities/lib/decode.d.ts +0 -211
- package/packages/config-markdownlint/node_modules/entities/lib/decode.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/decode.js +0 -536
- package/packages/config-markdownlint/node_modules/entities/lib/decode.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/decode_codepoint.d.ts +0 -19
- package/packages/config-markdownlint/node_modules/entities/lib/decode_codepoint.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/decode_codepoint.js +0 -76
- package/packages/config-markdownlint/node_modules/entities/lib/decode_codepoint.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/encode.d.ts +0 -22
- package/packages/config-markdownlint/node_modules/entities/lib/encode.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/encode.js +0 -77
- package/packages/config-markdownlint/node_modules/entities/lib/encode.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/escape.d.ts +0 -43
- package/packages/config-markdownlint/node_modules/entities/lib/escape.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/escape.js +0 -122
- package/packages/config-markdownlint/node_modules/entities/lib/escape.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/decode.d.ts +0 -211
- package/packages/config-markdownlint/node_modules/entities/lib/esm/decode.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/decode.js +0 -496
- package/packages/config-markdownlint/node_modules/entities/lib/esm/decode.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/decode_codepoint.d.ts +0 -19
- package/packages/config-markdownlint/node_modules/entities/lib/esm/decode_codepoint.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/decode_codepoint.js +0 -71
- package/packages/config-markdownlint/node_modules/entities/lib/esm/decode_codepoint.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/encode.d.ts +0 -22
- package/packages/config-markdownlint/node_modules/entities/lib/esm/encode.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/encode.js +0 -69
- package/packages/config-markdownlint/node_modules/entities/lib/esm/encode.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/escape.d.ts +0 -43
- package/packages/config-markdownlint/node_modules/entities/lib/esm/escape.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/escape.js +0 -116
- package/packages/config-markdownlint/node_modules/entities/lib/esm/escape.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/generated/decode-data-html.d.ts +0 -3
- package/packages/config-markdownlint/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/generated/decode-data-html.js +0 -7
- package/packages/config-markdownlint/node_modules/entities/lib/esm/generated/decode-data-html.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts +0 -3
- package/packages/config-markdownlint/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/generated/decode-data-xml.js +0 -7
- package/packages/config-markdownlint/node_modules/entities/lib/esm/generated/decode-data-xml.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/generated/encode-html.d.ts +0 -8
- package/packages/config-markdownlint/node_modules/entities/lib/esm/generated/encode-html.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/generated/encode-html.js +0 -10
- package/packages/config-markdownlint/node_modules/entities/lib/esm/generated/encode-html.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/index.d.ts +0 -96
- package/packages/config-markdownlint/node_modules/entities/lib/esm/index.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/index.js +0 -99
- package/packages/config-markdownlint/node_modules/entities/lib/esm/index.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/esm/package.json +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/generated/decode-data-html.d.ts +0 -3
- package/packages/config-markdownlint/node_modules/entities/lib/generated/decode-data-html.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/generated/decode-data-html.js +0 -9
- package/packages/config-markdownlint/node_modules/entities/lib/generated/decode-data-html.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/generated/decode-data-xml.d.ts +0 -3
- package/packages/config-markdownlint/node_modules/entities/lib/generated/decode-data-xml.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/generated/decode-data-xml.js +0 -9
- package/packages/config-markdownlint/node_modules/entities/lib/generated/decode-data-xml.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/generated/encode-html.d.ts +0 -8
- package/packages/config-markdownlint/node_modules/entities/lib/generated/encode-html.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/generated/encode-html.js +0 -12
- package/packages/config-markdownlint/node_modules/entities/lib/generated/encode-html.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/index.d.ts +0 -96
- package/packages/config-markdownlint/node_modules/entities/lib/index.d.ts.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/lib/index.js +0 -126
- package/packages/config-markdownlint/node_modules/entities/lib/index.js.map +0 -1
- package/packages/config-markdownlint/node_modules/entities/package.json +0 -90
- package/packages/config-markdownlint/node_modules/entities/readme.md +0 -122
- package/packages/config-markdownlint/node_modules/markdown-it/LICENSE +0 -22
- package/packages/config-markdownlint/node_modules/markdown-it/README.md +0 -324
- package/packages/config-markdownlint/node_modules/markdown-it/bin/markdown-it.mjs +0 -107
- package/packages/config-markdownlint/node_modules/markdown-it/dist/index.cjs.js +0 -5540
- package/packages/config-markdownlint/node_modules/markdown-it/dist/markdown-it.js +0 -6963
- package/packages/config-markdownlint/node_modules/markdown-it/dist/markdown-it.min.js +0 -2
- package/packages/config-markdownlint/node_modules/markdown-it/index.mjs +0 -1
- package/packages/config-markdownlint/node_modules/markdown-it/lib/common/html_blocks.mjs +0 -67
- package/packages/config-markdownlint/node_modules/markdown-it/lib/common/html_re.mjs +0 -25
- package/packages/config-markdownlint/node_modules/markdown-it/lib/common/utils.mjs +0 -304
- package/packages/config-markdownlint/node_modules/markdown-it/lib/helpers/index.mjs +0 -11
- package/packages/config-markdownlint/node_modules/markdown-it/lib/helpers/parse_link_destination.mjs +0 -77
- package/packages/config-markdownlint/node_modules/markdown-it/lib/helpers/parse_link_label.mjs +0 -49
- package/packages/config-markdownlint/node_modules/markdown-it/lib/helpers/parse_link_title.mjs +0 -66
- package/packages/config-markdownlint/node_modules/markdown-it/lib/index.mjs +0 -565
- package/packages/config-markdownlint/node_modules/markdown-it/lib/parser_block.mjs +0 -134
- package/packages/config-markdownlint/node_modules/markdown-it/lib/parser_core.mjs +0 -62
- package/packages/config-markdownlint/node_modules/markdown-it/lib/parser_inline.mjs +0 -197
- package/packages/config-markdownlint/node_modules/markdown-it/lib/presets/commonmark.mjs +0 -88
- package/packages/config-markdownlint/node_modules/markdown-it/lib/presets/default.mjs +0 -47
- package/packages/config-markdownlint/node_modules/markdown-it/lib/presets/zero.mjs +0 -70
- package/packages/config-markdownlint/node_modules/markdown-it/lib/renderer.mjs +0 -322
- package/packages/config-markdownlint/node_modules/markdown-it/lib/ruler.mjs +0 -340
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_block/blockquote.mjs +0 -209
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_block/code.mjs +0 -30
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_block/fence.mjs +0 -94
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_block/heading.mjs +0 -51
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_block/hr.mjs +0 -40
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_block/html_block.mjs +0 -69
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_block/lheading.mjs +0 -82
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_block/list.mjs +0 -331
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_block/paragraph.mjs +0 -46
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_block/reference.mjs +0 -212
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_block/state_block.mjs +0 -220
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_block/table.mjs +0 -228
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_core/block.mjs +0 -13
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_core/inline.mjs +0 -11
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_core/linkify.mjs +0 -134
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_core/normalize.mjs +0 -17
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_core/replacements.mjs +0 -101
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_core/smartquotes.mjs +0 -193
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_core/state_core.mjs +0 -17
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_core/text_join.mjs +0 -43
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/autolink.mjs +0 -72
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/backticks.mjs +0 -60
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs +0 -124
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/emphasis.mjs +0 -123
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/entity.mjs +0 -51
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/escape.mjs +0 -69
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/fragments_join.mjs +0 -38
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/html_inline.mjs +0 -50
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/image.mjs +0 -138
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/link.mjs +0 -139
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/linkify.mjs +0 -56
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/newline.mjs +0 -42
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/state_inline.mjs +0 -123
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs +0 -127
- package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/text.mjs +0 -86
- package/packages/config-markdownlint/node_modules/markdown-it/lib/token.mjs +0 -191
- package/packages/config-markdownlint/node_modules/markdown-it/package.json +0 -92
- package/packages/config-markdownlint/node_modules/markdownlint/CHANGELOG.md +0 -446
- package/packages/config-markdownlint/node_modules/markdownlint/CONTRIBUTING.md +0 -93
- package/packages/config-markdownlint/node_modules/markdownlint/LICENSE +0 -21
- package/packages/config-markdownlint/node_modules/markdownlint/README.md +0 -1032
- package/packages/config-markdownlint/node_modules/markdownlint/demo/markdownlint-browser.js +0 -7116
- package/packages/config-markdownlint/node_modules/markdownlint/doc/CustomRules.md +0 -383
- package/packages/config-markdownlint/node_modules/markdownlint/doc/Prettier.md +0 -27
- package/packages/config-markdownlint/node_modules/markdownlint/doc/ReleaseProcess.md +0 -20
- package/packages/config-markdownlint/node_modules/markdownlint/doc/Rules.md +0 -2462
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md001.md +0 -37
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md003.md +0 -59
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md004.md +0 -49
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md005.md +0 -53
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md007.md +0 -52
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md009.md +0 -51
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md010.md +0 -56
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md011.md +0 -30
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md012.md +0 -38
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md013.md +0 -58
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md014.md +0 -54
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md018.md +0 -27
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md019.md +0 -28
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md020.md +0 -29
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md021.md +0 -31
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md022.md +0 -52
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md023.md +0 -33
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md024.md +0 -44
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md025.md +0 -49
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md026.md +0 -40
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md027.md +0 -24
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md028.md +0 -40
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md029.md +0 -98
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md030.md +0 -82
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md031.md +0 -50
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md032.md +0 -55
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md033.md +0 -27
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md034.md +0 -50
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md035.md +0 -42
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md036.md +0 -45
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md037.md +0 -37
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md038.md +0 -40
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md039.md +0 -21
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md040.md +0 -52
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md041.md +0 -49
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md042.md +0 -32
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md043.md +0 -69
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md044.md +0 -35
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md045.md +0 -40
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md046.md +0 -40
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md047.md +0 -34
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md048.md +0 -41
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md049.md +0 -35
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md050.md +0 -35
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md051.md +0 -87
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md052.md +0 -40
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md053.md +0 -38
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md054.md +0 -100
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md055.md +0 -54
- package/packages/config-markdownlint/node_modules/markdownlint/doc/md056.md +0 -37
- package/packages/config-markdownlint/node_modules/markdownlint/helpers/LICENSE +0 -21
- package/packages/config-markdownlint/node_modules/markdownlint/helpers/README.md +0 -72
- package/packages/config-markdownlint/node_modules/markdownlint/helpers/helpers.js +0 -1025
- package/packages/config-markdownlint/node_modules/markdownlint/helpers/micromark.cjs +0 -445
- package/packages/config-markdownlint/node_modules/markdownlint/helpers/package.json +0 -26
- package/packages/config-markdownlint/node_modules/markdownlint/helpers/shared.js +0 -10
- package/packages/config-markdownlint/node_modules/markdownlint/lib/cache.js +0 -21
- package/packages/config-markdownlint/node_modules/markdownlint/lib/configuration.d.ts +0 -1178
- package/packages/config-markdownlint/node_modules/markdownlint/lib/constants.js +0 -14
- package/packages/config-markdownlint/node_modules/markdownlint/lib/markdownlint.d.ts +0 -479
- package/packages/config-markdownlint/node_modules/markdownlint/lib/markdownlint.js +0 -1550
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md001.js +0 -25
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md003.js +0 -45
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md004.js +0 -79
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md005.js +0 -81
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md007.js +0 -92
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md009.js +0 -89
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md010.js +0 -63
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md011.js +0 -49
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md012.js +0 -35
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md013.js +0 -99
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md014.js +0 -57
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md018.js +0 -38
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md019.js +0 -42
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md020.js +0 -65
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md021.js +0 -65
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md022.js +0 -116
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md023.js +0 -41
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md024.js +0 -45
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md025.js +0 -35
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md026.js +0 -54
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md027.js +0 -42
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md028.js +0 -47
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md029.js +0 -70
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md030.js +0 -66
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md031.js +0 -43
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md032.js +0 -76
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md033.js +0 -46
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md034.js +0 -105
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md035.js +0 -31
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md036.js +0 -50
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md037.js +0 -99
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md038.js +0 -106
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md039.js +0 -71
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md040.js +0 -42
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md041.js +0 -37
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md042.js +0 -53
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md043.js +0 -67
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md044.js +0 -115
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md045.js +0 -67
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md046.js +0 -40
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md047.js +0 -31
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md048.js +0 -43
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md049-md050.js +0 -108
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md051.js +0 -176
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md052.js +0 -42
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md053.js +0 -62
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md054.js +0 -130
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md055.js +0 -80
- package/packages/config-markdownlint/node_modules/markdownlint/lib/md056.js +0 -52
- package/packages/config-markdownlint/node_modules/markdownlint/lib/rules.js +0 -67
- package/packages/config-markdownlint/node_modules/markdownlint/package.json +0 -103
- package/packages/config-markdownlint/node_modules/markdownlint/schema/.markdownlint.jsonc +0 -304
- package/packages/config-markdownlint/node_modules/markdownlint/schema/.markdownlint.yaml +0 -272
- package/packages/config-markdownlint/node_modules/markdownlint/schema/ValidatingConfiguration.md +0 -28
- package/packages/config-markdownlint/node_modules/markdownlint/schema/markdownlint-config-schema.json +0 -1814
- package/packages/config-markdownlint/node_modules/markdownlint/style/all.json +0 -5
- package/packages/config-markdownlint/node_modules/markdownlint/style/cirosantilli.json +0 -22
- package/packages/config-markdownlint/node_modules/markdownlint/style/prettier.json +0 -26
- package/packages/config-markdownlint/node_modules/markdownlint/style/relaxed.json +0 -12
- package/packages/config-markdownlint/node_modules/markdownlint-micromark/LICENSE +0 -21
- package/packages/config-markdownlint/node_modules/markdownlint-micromark/README.md +0 -10
- package/packages/config-markdownlint/node_modules/markdownlint-micromark/micromark-browser.js +0 -2
- package/packages/config-markdownlint/node_modules/markdownlint-micromark/micromark-html-browser.js +0 -2
- package/packages/config-markdownlint/node_modules/markdownlint-micromark/micromark.cjs +0 -1
- package/packages/config-markdownlint/node_modules/markdownlint-micromark/micromark.d.ts +0 -1751
- package/packages/config-markdownlint/node_modules/markdownlint-micromark/package.json +0 -46
package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_core/replacements.mjs
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
// Simple typographic replacements
|
|
2
|
-
//
|
|
3
|
-
// (c) (C) → ©
|
|
4
|
-
// (tm) (TM) → ™
|
|
5
|
-
// (r) (R) → ®
|
|
6
|
-
// +- → ±
|
|
7
|
-
// ... → … (also ?.... → ?.., !.... → !..)
|
|
8
|
-
// ???????? → ???, !!!!! → !!!, `,,` → `,`
|
|
9
|
-
// -- → –, --- → —
|
|
10
|
-
//
|
|
11
|
-
|
|
12
|
-
// TODO:
|
|
13
|
-
// - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾
|
|
14
|
-
// - multiplications 2 x 4 -> 2 × 4
|
|
15
|
-
|
|
16
|
-
const RARE_RE = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/
|
|
17
|
-
|
|
18
|
-
// Workaround for phantomjs - need regex without /g flag,
|
|
19
|
-
// or root check will fail every second time
|
|
20
|
-
const SCOPED_ABBR_TEST_RE = /\((c|tm|r)\)/i
|
|
21
|
-
|
|
22
|
-
const SCOPED_ABBR_RE = /\((c|tm|r)\)/ig
|
|
23
|
-
const SCOPED_ABBR = {
|
|
24
|
-
c: '©',
|
|
25
|
-
r: '®',
|
|
26
|
-
tm: '™'
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function replaceFn (match, name) {
|
|
30
|
-
return SCOPED_ABBR[name.toLowerCase()]
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function replace_scoped (inlineTokens) {
|
|
34
|
-
let inside_autolink = 0
|
|
35
|
-
|
|
36
|
-
for (let i = inlineTokens.length - 1; i >= 0; i--) {
|
|
37
|
-
const token = inlineTokens[i]
|
|
38
|
-
|
|
39
|
-
if (token.type === 'text' && !inside_autolink) {
|
|
40
|
-
token.content = token.content.replace(SCOPED_ABBR_RE, replaceFn)
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
if (token.type === 'link_open' && token.info === 'auto') {
|
|
44
|
-
inside_autolink--
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
if (token.type === 'link_close' && token.info === 'auto') {
|
|
48
|
-
inside_autolink++
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function replace_rare (inlineTokens) {
|
|
54
|
-
let inside_autolink = 0
|
|
55
|
-
|
|
56
|
-
for (let i = inlineTokens.length - 1; i >= 0; i--) {
|
|
57
|
-
const token = inlineTokens[i]
|
|
58
|
-
|
|
59
|
-
if (token.type === 'text' && !inside_autolink) {
|
|
60
|
-
if (RARE_RE.test(token.content)) {
|
|
61
|
-
token.content = token.content
|
|
62
|
-
.replace(/\+-/g, '±')
|
|
63
|
-
// .., ..., ....... -> …
|
|
64
|
-
// but ?..... & !..... -> ?.. & !..
|
|
65
|
-
.replace(/\.{2,}/g, '…').replace(/([?!])…/g, '$1..')
|
|
66
|
-
.replace(/([?!]){4,}/g, '$1$1$1').replace(/,{2,}/g, ',')
|
|
67
|
-
// em-dash
|
|
68
|
-
.replace(/(^|[^-])---(?=[^-]|$)/mg, '$1\u2014')
|
|
69
|
-
// en-dash
|
|
70
|
-
.replace(/(^|\s)--(?=\s|$)/mg, '$1\u2013')
|
|
71
|
-
.replace(/(^|[^-\s])--(?=[^-\s]|$)/mg, '$1\u2013')
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
if (token.type === 'link_open' && token.info === 'auto') {
|
|
76
|
-
inside_autolink--
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
if (token.type === 'link_close' && token.info === 'auto') {
|
|
80
|
-
inside_autolink++
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export default function replace (state) {
|
|
86
|
-
let blkIdx
|
|
87
|
-
|
|
88
|
-
if (!state.md.options.typographer) { return }
|
|
89
|
-
|
|
90
|
-
for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {
|
|
91
|
-
if (state.tokens[blkIdx].type !== 'inline') { continue }
|
|
92
|
-
|
|
93
|
-
if (SCOPED_ABBR_TEST_RE.test(state.tokens[blkIdx].content)) {
|
|
94
|
-
replace_scoped(state.tokens[blkIdx].children)
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (RARE_RE.test(state.tokens[blkIdx].content)) {
|
|
98
|
-
replace_rare(state.tokens[blkIdx].children)
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_core/smartquotes.mjs
DELETED
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
// Convert straight quotation marks to typographic ones
|
|
2
|
-
//
|
|
3
|
-
|
|
4
|
-
import { isWhiteSpace, isPunctChar, isMdAsciiPunct } from '../common/utils.mjs'
|
|
5
|
-
|
|
6
|
-
const QUOTE_TEST_RE = /['"]/
|
|
7
|
-
const QUOTE_RE = /['"]/g
|
|
8
|
-
const APOSTROPHE = '\u2019' /* ’ */
|
|
9
|
-
|
|
10
|
-
function replaceAt (str, index, ch) {
|
|
11
|
-
return str.slice(0, index) + ch + str.slice(index + 1)
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function process_inlines (tokens, state) {
|
|
15
|
-
let j
|
|
16
|
-
|
|
17
|
-
const stack = []
|
|
18
|
-
|
|
19
|
-
for (let i = 0; i < tokens.length; i++) {
|
|
20
|
-
const token = tokens[i]
|
|
21
|
-
|
|
22
|
-
const thisLevel = tokens[i].level
|
|
23
|
-
|
|
24
|
-
for (j = stack.length - 1; j >= 0; j--) {
|
|
25
|
-
if (stack[j].level <= thisLevel) { break }
|
|
26
|
-
}
|
|
27
|
-
stack.length = j + 1
|
|
28
|
-
|
|
29
|
-
if (token.type !== 'text') { continue }
|
|
30
|
-
|
|
31
|
-
let text = token.content
|
|
32
|
-
let pos = 0
|
|
33
|
-
let max = text.length
|
|
34
|
-
|
|
35
|
-
/* eslint no-labels:0,block-scoped-var:0 */
|
|
36
|
-
OUTER:
|
|
37
|
-
while (pos < max) {
|
|
38
|
-
QUOTE_RE.lastIndex = pos
|
|
39
|
-
const t = QUOTE_RE.exec(text)
|
|
40
|
-
if (!t) { break }
|
|
41
|
-
|
|
42
|
-
let canOpen = true
|
|
43
|
-
let canClose = true
|
|
44
|
-
pos = t.index + 1
|
|
45
|
-
const isSingle = (t[0] === "'")
|
|
46
|
-
|
|
47
|
-
// Find previous character,
|
|
48
|
-
// default to space if it's the beginning of the line
|
|
49
|
-
//
|
|
50
|
-
let lastChar = 0x20
|
|
51
|
-
|
|
52
|
-
if (t.index - 1 >= 0) {
|
|
53
|
-
lastChar = text.charCodeAt(t.index - 1)
|
|
54
|
-
} else {
|
|
55
|
-
for (j = i - 1; j >= 0; j--) {
|
|
56
|
-
if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break // lastChar defaults to 0x20
|
|
57
|
-
if (!tokens[j].content) continue // should skip all tokens except 'text', 'html_inline' or 'code_inline'
|
|
58
|
-
|
|
59
|
-
lastChar = tokens[j].content.charCodeAt(tokens[j].content.length - 1)
|
|
60
|
-
break
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// Find next character,
|
|
65
|
-
// default to space if it's the end of the line
|
|
66
|
-
//
|
|
67
|
-
let nextChar = 0x20
|
|
68
|
-
|
|
69
|
-
if (pos < max) {
|
|
70
|
-
nextChar = text.charCodeAt(pos)
|
|
71
|
-
} else {
|
|
72
|
-
for (j = i + 1; j < tokens.length; j++) {
|
|
73
|
-
if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break // nextChar defaults to 0x20
|
|
74
|
-
if (!tokens[j].content) continue // should skip all tokens except 'text', 'html_inline' or 'code_inline'
|
|
75
|
-
|
|
76
|
-
nextChar = tokens[j].content.charCodeAt(0)
|
|
77
|
-
break
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar))
|
|
82
|
-
const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar))
|
|
83
|
-
|
|
84
|
-
const isLastWhiteSpace = isWhiteSpace(lastChar)
|
|
85
|
-
const isNextWhiteSpace = isWhiteSpace(nextChar)
|
|
86
|
-
|
|
87
|
-
if (isNextWhiteSpace) {
|
|
88
|
-
canOpen = false
|
|
89
|
-
} else if (isNextPunctChar) {
|
|
90
|
-
if (!(isLastWhiteSpace || isLastPunctChar)) {
|
|
91
|
-
canOpen = false
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
if (isLastWhiteSpace) {
|
|
96
|
-
canClose = false
|
|
97
|
-
} else if (isLastPunctChar) {
|
|
98
|
-
if (!(isNextWhiteSpace || isNextPunctChar)) {
|
|
99
|
-
canClose = false
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
if (nextChar === 0x22 /* " */ && t[0] === '"') {
|
|
104
|
-
if (lastChar >= 0x30 /* 0 */ && lastChar <= 0x39 /* 9 */) {
|
|
105
|
-
// special case: 1"" - count first quote as an inch
|
|
106
|
-
canClose = canOpen = false
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
if (canOpen && canClose) {
|
|
111
|
-
// Replace quotes in the middle of punctuation sequence, but not
|
|
112
|
-
// in the middle of the words, i.e.:
|
|
113
|
-
//
|
|
114
|
-
// 1. foo " bar " baz - not replaced
|
|
115
|
-
// 2. foo-"-bar-"-baz - replaced
|
|
116
|
-
// 3. foo"bar"baz - not replaced
|
|
117
|
-
//
|
|
118
|
-
canOpen = isLastPunctChar
|
|
119
|
-
canClose = isNextPunctChar
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
if (!canOpen && !canClose) {
|
|
123
|
-
// middle of word
|
|
124
|
-
if (isSingle) {
|
|
125
|
-
token.content = replaceAt(token.content, t.index, APOSTROPHE)
|
|
126
|
-
}
|
|
127
|
-
continue
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
if (canClose) {
|
|
131
|
-
// this could be a closing quote, rewind the stack to get a match
|
|
132
|
-
for (j = stack.length - 1; j >= 0; j--) {
|
|
133
|
-
let item = stack[j]
|
|
134
|
-
if (stack[j].level < thisLevel) { break }
|
|
135
|
-
if (item.single === isSingle && stack[j].level === thisLevel) {
|
|
136
|
-
item = stack[j]
|
|
137
|
-
|
|
138
|
-
let openQuote
|
|
139
|
-
let closeQuote
|
|
140
|
-
if (isSingle) {
|
|
141
|
-
openQuote = state.md.options.quotes[2]
|
|
142
|
-
closeQuote = state.md.options.quotes[3]
|
|
143
|
-
} else {
|
|
144
|
-
openQuote = state.md.options.quotes[0]
|
|
145
|
-
closeQuote = state.md.options.quotes[1]
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// replace token.content *before* tokens[item.token].content,
|
|
149
|
-
// because, if they are pointing at the same token, replaceAt
|
|
150
|
-
// could mess up indices when quote length != 1
|
|
151
|
-
token.content = replaceAt(token.content, t.index, closeQuote)
|
|
152
|
-
tokens[item.token].content = replaceAt(
|
|
153
|
-
tokens[item.token].content, item.pos, openQuote)
|
|
154
|
-
|
|
155
|
-
pos += closeQuote.length - 1
|
|
156
|
-
if (item.token === i) { pos += openQuote.length - 1 }
|
|
157
|
-
|
|
158
|
-
text = token.content
|
|
159
|
-
max = text.length
|
|
160
|
-
|
|
161
|
-
stack.length = j
|
|
162
|
-
continue OUTER
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
if (canOpen) {
|
|
168
|
-
stack.push({
|
|
169
|
-
token: i,
|
|
170
|
-
pos: t.index,
|
|
171
|
-
single: isSingle,
|
|
172
|
-
level: thisLevel
|
|
173
|
-
})
|
|
174
|
-
} else if (canClose && isSingle) {
|
|
175
|
-
token.content = replaceAt(token.content, t.index, APOSTROPHE)
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
export default function smartquotes (state) {
|
|
182
|
-
/* eslint max-depth:0 */
|
|
183
|
-
if (!state.md.options.typographer) { return }
|
|
184
|
-
|
|
185
|
-
for (let blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {
|
|
186
|
-
if (state.tokens[blkIdx].type !== 'inline' ||
|
|
187
|
-
!QUOTE_TEST_RE.test(state.tokens[blkIdx].content)) {
|
|
188
|
-
continue
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
process_inlines(state.tokens[blkIdx].children, state)
|
|
192
|
-
}
|
|
193
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// Core state object
|
|
2
|
-
//
|
|
3
|
-
|
|
4
|
-
import Token from '../token.mjs'
|
|
5
|
-
|
|
6
|
-
function StateCore (src, md, env) {
|
|
7
|
-
this.src = src
|
|
8
|
-
this.env = env
|
|
9
|
-
this.tokens = []
|
|
10
|
-
this.inlineMode = false
|
|
11
|
-
this.md = md // link to parser instance
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// re-export Token class to use in core rules
|
|
15
|
-
StateCore.prototype.Token = Token
|
|
16
|
-
|
|
17
|
-
export default StateCore
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
// Join raw text tokens with the rest of the text
|
|
2
|
-
//
|
|
3
|
-
// This is set as a separate rule to provide an opportunity for plugins
|
|
4
|
-
// to run text replacements after text join, but before escape join.
|
|
5
|
-
//
|
|
6
|
-
// For example, `\:)` shouldn't be replaced with an emoji.
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
export default function text_join (state) {
|
|
10
|
-
let curr, last
|
|
11
|
-
const blockTokens = state.tokens
|
|
12
|
-
const l = blockTokens.length
|
|
13
|
-
|
|
14
|
-
for (let j = 0; j < l; j++) {
|
|
15
|
-
if (blockTokens[j].type !== 'inline') continue
|
|
16
|
-
|
|
17
|
-
const tokens = blockTokens[j].children
|
|
18
|
-
const max = tokens.length
|
|
19
|
-
|
|
20
|
-
for (curr = 0; curr < max; curr++) {
|
|
21
|
-
if (tokens[curr].type === 'text_special') {
|
|
22
|
-
tokens[curr].type = 'text'
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
for (curr = last = 0; curr < max; curr++) {
|
|
27
|
-
if (tokens[curr].type === 'text' &&
|
|
28
|
-
curr + 1 < max &&
|
|
29
|
-
tokens[curr + 1].type === 'text') {
|
|
30
|
-
// collapse two adjacent text nodes
|
|
31
|
-
tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content
|
|
32
|
-
} else {
|
|
33
|
-
if (curr !== last) { tokens[last] = tokens[curr] }
|
|
34
|
-
|
|
35
|
-
last++
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
if (curr !== last) {
|
|
40
|
-
tokens.length = last
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
// Process autolinks '<protocol:...>'
|
|
2
|
-
|
|
3
|
-
/* eslint max-len:0 */
|
|
4
|
-
const EMAIL_RE = /^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/
|
|
5
|
-
/* eslint-disable-next-line no-control-regex */
|
|
6
|
-
const AUTOLINK_RE = /^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/
|
|
7
|
-
|
|
8
|
-
export default function autolink (state, silent) {
|
|
9
|
-
let pos = state.pos
|
|
10
|
-
|
|
11
|
-
if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false }
|
|
12
|
-
|
|
13
|
-
const start = state.pos
|
|
14
|
-
const max = state.posMax
|
|
15
|
-
|
|
16
|
-
for (;;) {
|
|
17
|
-
if (++pos >= max) return false
|
|
18
|
-
|
|
19
|
-
const ch = state.src.charCodeAt(pos)
|
|
20
|
-
|
|
21
|
-
if (ch === 0x3C /* < */) return false
|
|
22
|
-
if (ch === 0x3E /* > */) break
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const url = state.src.slice(start + 1, pos)
|
|
26
|
-
|
|
27
|
-
if (AUTOLINK_RE.test(url)) {
|
|
28
|
-
const fullUrl = state.md.normalizeLink(url)
|
|
29
|
-
if (!state.md.validateLink(fullUrl)) { return false }
|
|
30
|
-
|
|
31
|
-
if (!silent) {
|
|
32
|
-
const token_o = state.push('link_open', 'a', 1)
|
|
33
|
-
token_o.attrs = [['href', fullUrl]]
|
|
34
|
-
token_o.markup = 'autolink'
|
|
35
|
-
token_o.info = 'auto'
|
|
36
|
-
|
|
37
|
-
const token_t = state.push('text', '', 0)
|
|
38
|
-
token_t.content = state.md.normalizeLinkText(url)
|
|
39
|
-
|
|
40
|
-
const token_c = state.push('link_close', 'a', -1)
|
|
41
|
-
token_c.markup = 'autolink'
|
|
42
|
-
token_c.info = 'auto'
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
state.pos += url.length + 2
|
|
46
|
-
return true
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
if (EMAIL_RE.test(url)) {
|
|
50
|
-
const fullUrl = state.md.normalizeLink('mailto:' + url)
|
|
51
|
-
if (!state.md.validateLink(fullUrl)) { return false }
|
|
52
|
-
|
|
53
|
-
if (!silent) {
|
|
54
|
-
const token_o = state.push('link_open', 'a', 1)
|
|
55
|
-
token_o.attrs = [['href', fullUrl]]
|
|
56
|
-
token_o.markup = 'autolink'
|
|
57
|
-
token_o.info = 'auto'
|
|
58
|
-
|
|
59
|
-
const token_t = state.push('text', '', 0)
|
|
60
|
-
token_t.content = state.md.normalizeLinkText(url)
|
|
61
|
-
|
|
62
|
-
const token_c = state.push('link_close', 'a', -1)
|
|
63
|
-
token_c.markup = 'autolink'
|
|
64
|
-
token_c.info = 'auto'
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
state.pos += url.length + 2
|
|
68
|
-
return true
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return false
|
|
72
|
-
}
|
package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/backticks.mjs
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
// Parse backticks
|
|
2
|
-
|
|
3
|
-
export default function backtick (state, silent) {
|
|
4
|
-
let pos = state.pos
|
|
5
|
-
const ch = state.src.charCodeAt(pos)
|
|
6
|
-
|
|
7
|
-
if (ch !== 0x60/* ` */) { return false }
|
|
8
|
-
|
|
9
|
-
const start = pos
|
|
10
|
-
pos++
|
|
11
|
-
const max = state.posMax
|
|
12
|
-
|
|
13
|
-
// scan marker length
|
|
14
|
-
while (pos < max && state.src.charCodeAt(pos) === 0x60/* ` */) { pos++ }
|
|
15
|
-
|
|
16
|
-
const marker = state.src.slice(start, pos)
|
|
17
|
-
const openerLength = marker.length
|
|
18
|
-
|
|
19
|
-
if (state.backticksScanned && (state.backticks[openerLength] || 0) <= start) {
|
|
20
|
-
if (!silent) state.pending += marker
|
|
21
|
-
state.pos += openerLength
|
|
22
|
-
return true
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
let matchEnd = pos
|
|
26
|
-
let matchStart
|
|
27
|
-
|
|
28
|
-
// Nothing found in the cache, scan until the end of the line (or until marker is found)
|
|
29
|
-
while ((matchStart = state.src.indexOf('`', matchEnd)) !== -1) {
|
|
30
|
-
matchEnd = matchStart + 1
|
|
31
|
-
|
|
32
|
-
// scan marker length
|
|
33
|
-
while (matchEnd < max && state.src.charCodeAt(matchEnd) === 0x60/* ` */) { matchEnd++ }
|
|
34
|
-
|
|
35
|
-
const closerLength = matchEnd - matchStart
|
|
36
|
-
|
|
37
|
-
if (closerLength === openerLength) {
|
|
38
|
-
// Found matching closer length.
|
|
39
|
-
if (!silent) {
|
|
40
|
-
const token = state.push('code_inline', 'code', 0)
|
|
41
|
-
token.markup = marker
|
|
42
|
-
token.content = state.src.slice(pos, matchStart)
|
|
43
|
-
.replace(/\n/g, ' ')
|
|
44
|
-
.replace(/^ (.+) $/, '$1')
|
|
45
|
-
}
|
|
46
|
-
state.pos = matchEnd
|
|
47
|
-
return true
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// Some different length found, put it in cache as upper limit of where closer can be found
|
|
51
|
-
state.backticks[closerLength] = matchStart
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// Scanned through the end, didn't find anything
|
|
55
|
-
state.backticksScanned = true
|
|
56
|
-
|
|
57
|
-
if (!silent) state.pending += marker
|
|
58
|
-
state.pos += openerLength
|
|
59
|
-
return true
|
|
60
|
-
}
|
package/packages/config-markdownlint/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
// For each opening emphasis-like marker find a matching closing one
|
|
2
|
-
//
|
|
3
|
-
|
|
4
|
-
function processDelimiters (delimiters) {
|
|
5
|
-
const openersBottom = {}
|
|
6
|
-
const max = delimiters.length
|
|
7
|
-
|
|
8
|
-
if (!max) return
|
|
9
|
-
|
|
10
|
-
// headerIdx is the first delimiter of the current (where closer is) delimiter run
|
|
11
|
-
let headerIdx = 0
|
|
12
|
-
let lastTokenIdx = -2 // needs any value lower than -1
|
|
13
|
-
const jumps = []
|
|
14
|
-
|
|
15
|
-
for (let closerIdx = 0; closerIdx < max; closerIdx++) {
|
|
16
|
-
const closer = delimiters[closerIdx]
|
|
17
|
-
|
|
18
|
-
jumps.push(0)
|
|
19
|
-
|
|
20
|
-
// markers belong to same delimiter run if:
|
|
21
|
-
// - they have adjacent tokens
|
|
22
|
-
// - AND markers are the same
|
|
23
|
-
//
|
|
24
|
-
if (delimiters[headerIdx].marker !== closer.marker || lastTokenIdx !== closer.token - 1) {
|
|
25
|
-
headerIdx = closerIdx
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
lastTokenIdx = closer.token
|
|
29
|
-
|
|
30
|
-
// Length is only used for emphasis-specific "rule of 3",
|
|
31
|
-
// if it's not defined (in strikethrough or 3rd party plugins),
|
|
32
|
-
// we can default it to 0 to disable those checks.
|
|
33
|
-
//
|
|
34
|
-
closer.length = closer.length || 0
|
|
35
|
-
|
|
36
|
-
if (!closer.close) continue
|
|
37
|
-
|
|
38
|
-
// Previously calculated lower bounds (previous fails)
|
|
39
|
-
// for each marker, each delimiter length modulo 3,
|
|
40
|
-
// and for whether this closer can be an opener;
|
|
41
|
-
// https://github.com/commonmark/cmark/commit/34250e12ccebdc6372b8b49c44fab57c72443460
|
|
42
|
-
/* eslint-disable-next-line no-prototype-builtins */
|
|
43
|
-
if (!openersBottom.hasOwnProperty(closer.marker)) {
|
|
44
|
-
openersBottom[closer.marker] = [-1, -1, -1, -1, -1, -1]
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
const minOpenerIdx = openersBottom[closer.marker][(closer.open ? 3 : 0) + (closer.length % 3)]
|
|
48
|
-
|
|
49
|
-
let openerIdx = headerIdx - jumps[headerIdx] - 1
|
|
50
|
-
|
|
51
|
-
let newMinOpenerIdx = openerIdx
|
|
52
|
-
|
|
53
|
-
for (; openerIdx > minOpenerIdx; openerIdx -= jumps[openerIdx] + 1) {
|
|
54
|
-
const opener = delimiters[openerIdx]
|
|
55
|
-
|
|
56
|
-
if (opener.marker !== closer.marker) continue
|
|
57
|
-
|
|
58
|
-
if (opener.open && opener.end < 0) {
|
|
59
|
-
let isOddMatch = false
|
|
60
|
-
|
|
61
|
-
// from spec:
|
|
62
|
-
//
|
|
63
|
-
// If one of the delimiters can both open and close emphasis, then the
|
|
64
|
-
// sum of the lengths of the delimiter runs containing the opening and
|
|
65
|
-
// closing delimiters must not be a multiple of 3 unless both lengths
|
|
66
|
-
// are multiples of 3.
|
|
67
|
-
//
|
|
68
|
-
if (opener.close || closer.open) {
|
|
69
|
-
if ((opener.length + closer.length) % 3 === 0) {
|
|
70
|
-
if (opener.length % 3 !== 0 || closer.length % 3 !== 0) {
|
|
71
|
-
isOddMatch = true
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
if (!isOddMatch) {
|
|
77
|
-
// If previous delimiter cannot be an opener, we can safely skip
|
|
78
|
-
// the entire sequence in future checks. This is required to make
|
|
79
|
-
// sure algorithm has linear complexity (see *_*_*_*_*_... case).
|
|
80
|
-
//
|
|
81
|
-
const lastJump = openerIdx > 0 && !delimiters[openerIdx - 1].open
|
|
82
|
-
? jumps[openerIdx - 1] + 1
|
|
83
|
-
: 0
|
|
84
|
-
|
|
85
|
-
jumps[closerIdx] = closerIdx - openerIdx + lastJump
|
|
86
|
-
jumps[openerIdx] = lastJump
|
|
87
|
-
|
|
88
|
-
closer.open = false
|
|
89
|
-
opener.end = closerIdx
|
|
90
|
-
opener.close = false
|
|
91
|
-
newMinOpenerIdx = -1
|
|
92
|
-
// treat next token as start of run,
|
|
93
|
-
// it optimizes skips in **<...>**a**<...>** pathological case
|
|
94
|
-
lastTokenIdx = -2
|
|
95
|
-
break
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if (newMinOpenerIdx !== -1) {
|
|
101
|
-
// If match for this delimiter run failed, we want to set lower bound for
|
|
102
|
-
// future lookups. This is required to make sure algorithm has linear
|
|
103
|
-
// complexity.
|
|
104
|
-
//
|
|
105
|
-
// See details here:
|
|
106
|
-
// https://github.com/commonmark/cmark/issues/178#issuecomment-270417442
|
|
107
|
-
//
|
|
108
|
-
openersBottom[closer.marker][(closer.open ? 3 : 0) + ((closer.length || 0) % 3)] = newMinOpenerIdx
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export default function link_pairs (state) {
|
|
114
|
-
const tokens_meta = state.tokens_meta
|
|
115
|
-
const max = state.tokens_meta.length
|
|
116
|
-
|
|
117
|
-
processDelimiters(state.delimiters)
|
|
118
|
-
|
|
119
|
-
for (let curr = 0; curr < max; curr++) {
|
|
120
|
-
if (tokens_meta[curr] && tokens_meta[curr].delimiters) {
|
|
121
|
-
processDelimiters(tokens_meta[curr].delimiters)
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|