diff --git a/LICENSE b/LICENSE index e69f42ddc81a5a379682b873715b1ddb43252e05..113813b9b18740352f1edc4bdd58c528e85fa82e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (C) 2021 by MrHope +Copyright (C) 2021 - PRESENT by MrHope Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/packages/add-this/LICENSE b/packages/add-this/LICENSE index 9b38ff03dd484d5c996afcec93da273196a09eaa..d8985c6f018d0d7eb7d34aa058c37e7353f6b2db 100644 --- a/packages/add-this/LICENSE +++ b/packages/add-this/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (C) 2020 by MrHope +Copyright (C) 2020 - PRESENT by MrHope Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/packages/blog2/LICENSE b/packages/blog2/LICENSE index e69f42ddc81a5a379682b873715b1ddb43252e05..10640a49a176dad872dc44551a0b6716a81bcf22 100644 --- a/packages/blog2/LICENSE +++ b/packages/blog2/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (C) 2021 by MrHope +Copyright (C) 2022 - PRESENT by MrHope Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/packages/comment2/LICENSE b/packages/comment2/LICENSE index 9b38ff03dd484d5c996afcec93da273196a09eaa..d8985c6f018d0d7eb7d34aa058c37e7353f6b2db 100644 --- a/packages/comment2/LICENSE +++ b/packages/comment2/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (C) 2020 by MrHope +Copyright (C) 2020 - PRESENT by MrHope Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/packages/components/LICENSE b/packages/components/LICENSE index 9b38ff03dd484d5c996afcec93da273196a09eaa..d8985c6f018d0d7eb7d34aa058c37e7353f6b2db 100644 --- a/packages/components/LICENSE +++ b/packages/components/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (C) 2020 by MrHope +Copyright (C) 2020 - PRESENT by MrHope Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/packages/copy-code2/LICENSE b/packages/copy-code2/LICENSE index 083996fdfd43183f4f90621ebf0aa80f2eefdac2..d8985c6f018d0d7eb7d34aa058c37e7353f6b2db 100644 --- a/packages/copy-code2/LICENSE +++ b/packages/copy-code2/LICENSE @@ -1,7 +1,6 @@ -MIT License +The MIT License (MIT) -Copyright (c) 2019 vxhly -Copyright (C) 2020 by MrHope +Copyright (C) 2020 - PRESENT by MrHope Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -10,14 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -© 2019 GitHub, Inc. \ No newline at end of file +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/packages/copy-code2/src/client/appSetup.ts b/packages/copy-code2/src/client/appSetup.ts index d5735d05f9bc3ad2e84db4e47244ed95ad262e2d..14c15dff325f5f4c5cbda1a02f3b9a98c0e1a509 100644 --- a/packages/copy-code2/src/client/appSetup.ts +++ b/packages/copy-code2/src/client/appSetup.ts @@ -1,3 +1,30 @@ +/** + * Forked and edited from https://github.com/vxhly/vuepress-plugin-one-click-copy/blob/master/bin/clientRootMixin.js + * + * MIT License + * + * Copyright (c) 2019 vxhly + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * © 2019 GitHub, Inc. + */ + import { useLocaleConfig } from "@mr-hope/vuepress-shared/lib/client"; import { defineClientAppSetup } from "@vuepress/client"; import { onMounted, watch } from "vue"; diff --git a/packages/copy-code2/src/client/message.ts b/packages/copy-code2/src/client/message.ts index 8a7046d80fbd5c4765732789f50b102122894638..cbac54732df363b516bbbb6cb32c845de509b2da 100644 --- a/packages/copy-code2/src/client/message.ts +++ b/packages/copy-code2/src/client/message.ts @@ -1,3 +1,30 @@ +/** + * Forked and edited from https://github.com/vxhly/vuepress-plugin-one-click-copy/blob/master/bin/Message.js + * + * MIT License + * + * Copyright (c) 2019 vxhly + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * © 2019 GitHub, Inc. + */ + export default class Message { private containerElement: HTMLElement; diff --git a/packages/feed2/LICENSE b/packages/feed2/LICENSE index 6e930e655dc0c820ec07bae29a4b8487d12a0c4c..d8985c6f018d0d7eb7d34aa058c37e7353f6b2db 100644 --- a/packages/feed2/LICENSE +++ b/packages/feed2/LICENSE @@ -1,8 +1,6 @@ The MIT License (MIT) -Copyright (C) 2020 by MrHope -Copyright (c) 2019 - present webmasterish -Copyright (c) 2015 Stian Grytøyr +Copyright (C) 2020 - PRESENT by MrHope Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/packages/lightgallery/LICENSE b/packages/lightgallery/LICENSE index aed2388d943977d7be43298d63b3391b3a75d68e..113813b9b18740352f1edc4bdd58c528e85fa82e 100644 --- a/packages/lightgallery/LICENSE +++ b/packages/lightgallery/LICENSE @@ -1,6 +1,6 @@ -MIT License +The MIT License (MIT) -Copyright (C) 2021 by MrHope +Copyright (C) 2021 - PRESENT by MrHope Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -9,14 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -© 2019 GitHub, Inc. \ No newline at end of file +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/packages/md-enhance/LICENSE b/packages/md-enhance/LICENSE index 1a51a51cfef0f2184a2274a98ac5b18bcb7dda2f..d8985c6f018d0d7eb7d34aa058c37e7353f6b2db 100644 --- a/packages/md-enhance/LICENSE +++ b/packages/md-enhance/LICENSE @@ -1,26 +1,21 @@ The MIT License (MIT) -Copyright (c) 2014-2015 Vitaly Puzrin, Alex Kocharin. -Copyright (c) 2018 melon -Copyright (C) 2020 by MrHope +Copyright (C) 2020 - PRESENT by MrHope -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/packages/md-enhance/__tests__/unit/__snapshots__/footnote.spec.ts.snap b/packages/md-enhance/__tests__/unit/__snapshots__/footnote.spec.ts.snap index 725141825797a07c2e0c3b471638012179bbe38f..86c1528394296494ece9d250c87b36ac8579079c 100644 --- a/packages/md-enhance/__tests__/unit/__snapshots__/footnote.spec.ts.snap +++ b/packages/md-enhance/__tests__/unit/__snapshots__/footnote.spec.ts.snap @@ -86,6 +86,19 @@ exports[`footnote Label cannot contain spaces or newlines 1`] = ` " `; +exports[`footnote Nested footnotes 1`] = ` +"

foo[1] bar[2].

+
+
+
    +
  1. ↩︎
  2. +
  3. baz ↩︎

    +
  4. +
+
+" +`; + exports[`footnote Pandoc example 1`] = ` "

Here is a footnote reference,[1] and another.[2]

This paragraph won't be part of the note, because it diff --git a/packages/md-enhance/__tests__/unit/footnote.spec.ts b/packages/md-enhance/__tests__/unit/footnote.spec.ts index 6be267b932f5735b408933bdb467ec15e657bd8d..d7cae924996b18533a747be25f00af32e2d8e46c 100644 --- a/packages/md-enhance/__tests__/unit/footnote.spec.ts +++ b/packages/md-enhance/__tests__/unit/footnote.spec.ts @@ -65,6 +65,16 @@ baz ).toMatchSnapshot(); }); + it("Nested footnotes", () => { + expect( + markdownIt.render(` +foo[^1] bar[^2]. + +[^1]:[^2]: baz +`) + ).toMatchSnapshot(); + }); + it("Should support inline note", () => { expect( markdownIt.render(` diff --git a/packages/md-enhance/src/node/markdown-it/footnote.ts b/packages/md-enhance/src/node/markdown-it/footnote.ts index 24987f7bb4dd28ad73ed156cfccb84320b6e03b0..1a81ae346fb34231028d35545e0e4dc02c0c2b4e 100644 --- a/packages/md-enhance/src/node/markdown-it/footnote.ts +++ b/packages/md-enhance/src/node/markdown-it/footnote.ts @@ -1,3 +1,30 @@ +/** + * Forked from https://github.com/markdown-it/markdown-it-footnote/blob/master/index.js + * + * Copyright (c) 2014-2015 Vitaly Puzrin, Alex Kocharin. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + import Token from "markdown-it/lib/token"; import parseLinkLabel from "markdown-it/lib/helpers/parse_link_label"; @@ -408,7 +435,7 @@ const footnoteTail = (state: FootNoteStateCore): boolean => { } else if (list[i].label) tokens = refTokens[`:${list[i].label as string}`]; else tokens = []; - state.tokens = state.tokens.concat(tokens); + if (tokens) state.tokens = state.tokens.concat(tokens); if (state.tokens[state.tokens.length - 1].type === "paragraph_close") lastParagraph = state.tokens.pop() || null; else lastParagraph = null; diff --git a/packages/md-enhance/src/node/markdown-it/katex.ts b/packages/md-enhance/src/node/markdown-it/katex.ts index 69f8343a3fa66028d23612427049b2c93b290f7e..4f7f946b63dc32b83c86b462c8ca799262a2dedd 100644 --- a/packages/md-enhance/src/node/markdown-it/katex.ts +++ b/packages/md-enhance/src/node/markdown-it/katex.ts @@ -1,3 +1,29 @@ +/** + * Forked from https://github.com/waylonflinn/markdown-it-katex/blob/master/index.js + * + * The MIT License (MIT) + * + * Copyright (c) 2016 Waylon Flinn + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + import Katex from "katex"; import { escapeHtml } from "./utils"; diff --git a/packages/md-enhance/src/node/markdown-it/mark.ts b/packages/md-enhance/src/node/markdown-it/mark.ts index 506d68da6afba9d732b28a76b6a74b8418348c24..f17b425363ca69498cf16d246abcfed4e4f8bbaa 100644 --- a/packages/md-enhance/src/node/markdown-it/mark.ts +++ b/packages/md-enhance/src/node/markdown-it/mark.ts @@ -1,3 +1,30 @@ +/** + * Forked from https://github.com/markdown-it/markdown-it-mark/blob/master/index.js + * + * Copyright (c) 2014-2015 Vitaly Puzrin, Alex Kocharin. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + import type MarkdownIt from "markdown-it"; import type StateInline from "markdown-it/lib/rules_inline/state_inline"; @@ -31,7 +58,7 @@ const tokenize = (state: StateInline, silent: boolean): boolean => { state.delimiters.push({ marker: 0x3d, length: 0, // disable "rule of 3" length checks meant for emphasis - jump: i / 2, + jump: i / 2, // 1 delimiter = 2 characters token: state.tokens.length - 1, end: -1, open: scanned.can_open, diff --git a/packages/md-enhance/src/node/markdown-it/sub.ts b/packages/md-enhance/src/node/markdown-it/sub.ts index ebfb393a61b952be1e26f3d7f634f218ca98b41b..b71de61d302ce05897456127b8f903db9a8702fa 100644 --- a/packages/md-enhance/src/node/markdown-it/sub.ts +++ b/packages/md-enhance/src/node/markdown-it/sub.ts @@ -1,3 +1,30 @@ +/** + * Forked from https://github.com/markdown-it/markdown-it-sub/blob/master/index.js + * + * Copyright (c) 2014-2015 Vitaly Puzrin, Alex Kocharin. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + import { UNESCAPE_RE } from "./utils"; import type MarkdownIt from "markdown-it"; diff --git a/packages/md-enhance/src/node/markdown-it/sup.ts b/packages/md-enhance/src/node/markdown-it/sup.ts index d41970f99a433283c1984000f3fa688ed6f3ed89..54e0b6ddfc5db06a28ada2ce0e30be26d025278b 100644 --- a/packages/md-enhance/src/node/markdown-it/sup.ts +++ b/packages/md-enhance/src/node/markdown-it/sup.ts @@ -1,4 +1,30 @@ -// Process ^superscript^ +/** + * Forked from https://github.com/markdown-it/markdown-it-sup/blob/master/index.js + * + * Copyright (c) 2014-2015 Vitaly Puzrin, Alex Kocharin. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + import { UNESCAPE_RE } from "./utils"; import type MarkdownIt from "markdown-it"; diff --git a/packages/md-enhance/src/node/markdown-it/tasklist.ts b/packages/md-enhance/src/node/markdown-it/tasklist.ts index dd58c40e102efe7fbd3ad6dca1c496a1fec64744..70f81745d86bde8f373cb57d205736fd1fdf6d9d 100644 --- a/packages/md-enhance/src/node/markdown-it/tasklist.ts +++ b/packages/md-enhance/src/node/markdown-it/tasklist.ts @@ -1,3 +1,21 @@ +/** + * Forked from https://github.com/revin/markdown-it-task-lists/blob/master/index.js + * + * Copyright (c) 2016, Revin Guillen + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + import Token from "markdown-it/lib/token"; import type MarkdownIt from "markdown-it";