diff --git a/components/page-footer/Contribution.tsx b/components/page-footer/Contribution.tsx index f966da14f28d..5f86435f61c9 100644 --- a/components/page-footer/Contribution.tsx +++ b/components/page-footer/Contribution.tsx @@ -20,12 +20,7 @@ export const Contribution = () => { {t`button`}
diff --git a/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-aws.md b/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-aws.md index c6d34b461613..f748b1271ca6 100644 --- a/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-aws.md +++ b/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-aws.md @@ -99,6 +99,7 @@ If you're setting up your AMI for the first time, you will need to create a secu This table identifies what each port is used for. {% data reusables.enterprise_installation.necessary_ports %} + ## Creating the {% data variables.product.prodname_ghe_server %} instance To create the instance, you'll need to launch an EC2 instance with your {% data variables.product.prodname_ghe_server %} AMI and attach an additional storage volume for your instance data. For more information, see "[Hardware considerations](#hardware-considerations)." diff --git a/lib/correct-translation-content.js b/lib/correct-translation-content.js index f9c8ed141559..cefb28788dfe 100644 --- a/lib/correct-translation-content.js +++ b/lib/correct-translation-content.js @@ -18,6 +18,33 @@ export function correctTranslatedContentStrings(content, englishContent, context content = content.replaceAll('[AUTOTITLE"을]', '[AUTOTITLE]') content = content.replaceAll('["AUTOTITLE]', '"[AUTOTITLE]') content = content.replaceAll('[AUTOTITLE"을 참조하세요.](', '[AUTOTITLE](') + content = content.replaceAll('[ AUTOTITLE](', '[AUTOTITLE](') + content = content.replaceAll('[ "AUTOTITLE](', '[AUTOTITLE](') + + if (context.code === 'ru') { + // We've seen a lot of these in the Russian translations: + content = content.replaceAll('{% данных variables', '{% data variables') + + // For the rather custom Russian translation of + // the content/get-started/quickstart/github-glossary.md page + // These string replacements speak for themselves. + content = content.replaceAll( + '{% для глоссария в глоссариях %}', + '{% for glossary in glossaries %}', + ) + content = content.replaceAll('{{ глоссарий.term }}', '{{ glossary.term }}') + content = content.replaceAll('{{ глоссарий.description }}', '{{ glossary.description }}') + } + + if (context.code === 'ko') { + // For the rather custom Korean translation of github-glossary.md + // Let's try to salvage based on what's in + // docs-internal.ko-kr/content/get-started/quickstart/github-glossary.md + // as of September 2023. + content = content.replaceAll('용어집 %}의 용어집에 대한 {%', '{% for glossary in glossaries %}') + content = content.replaceAll('{{ 용어집.term }}', '{{ glossary.term }}') + content = content.replaceAll('{{ 용어집.description }}', '{{ glossary.description }}') + } // A lot of Liquid tags lose their linebreak after the `}` which can // result in formatting problems, especially around Markdown tables. diff --git a/middleware/contextualizers/glossaries.js b/middleware/contextualizers/glossaries.js index ad48a8c8e3b2..42073c6d307d 100644 --- a/middleware/contextualizers/glossaries.js +++ b/middleware/contextualizers/glossaries.js @@ -46,6 +46,7 @@ export default async function glossaries(req, res, next) { // in this mapping we often don't have an English equivalent. // So that's why we fall back on the empty string. enGlossaryMap.get(glossary.term) || '', + { code: req.context.currentLanguage }, ) } description = await executeWithFallback( diff --git a/package-lock.json b/package-lock.json index e8c983e5a80e..7c1c60bbb2d7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -68,16 +68,14 @@ "port-used": "^2.0.8", "react": "18.2.0", "react-dom": "18.2.0", - "react-markdown": "^8.0.3", "react-syntax-highlighter": "^15.5.0", "rehype-highlight": "^6.0.0", "rehype-raw": "^6.1.1", - "rehype-slug": "^5.0.1", - "rehype-stringify": "^9.0.3", + "rehype-slug": "^5.1.0", + "rehype-stringify": "^9.0.4", "remark-gemoji-to-emoji": "^1.1.0", "remark-gfm": "^3.0.1", - "remark-parse": "^10.0.1", - "remark-parse-no-trim": "^8.0.4", + "remark-parse": "^10.0.2", "remark-rehype": "^10.1.0", "rss-parser": "^3.13.0", "scroll-anchoring": "^0.1.0", @@ -87,7 +85,7 @@ "strip-html-comments": "^1.0.0", "styled-components": "^5.3.5", "swr": "^2.0.0", - "unified": "^10.1.2", + "unified": "^11.0.3", "unist-util-visit": "^5.0.0", "url-template": "^3.0.0", "walk-sync": "^3.0.0" @@ -2257,17 +2255,17 @@ "license": "BSD-3-Clause" }, "node_modules/@pkgr/utils": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.1.tgz", - "integrity": "sha512-JOqwkgFEyi+OROIyq7l4Jy28h/WwhDnG/cPkXG2Z1iFbubB6jsHW1NDvmyOzTBxHr3yg68YGirmh1JUgMqa+9w==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.2.tgz", + "integrity": "sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==", "dev": true, "dependencies": { "cross-spawn": "^7.0.3", - "fast-glob": "^3.2.12", + "fast-glob": "^3.3.0", "is-glob": "^4.0.3", "open": "^9.1.0", "picocolors": "^1.0.0", - "tslib": "^2.5.0" + "tslib": "^2.6.0" }, "engines": { "node": "^12.20.0 || ^14.18.0 || >=16.0.0" @@ -2276,6 +2274,12 @@ "url": "https://opencollective.com/unts" } }, + "node_modules/@pkgr/utils/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, "node_modules/@playwright/test": { "version": "1.38.0", "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.38.0.tgz", @@ -4256,14 +4260,6 @@ "node": ">= 0.12.0" } }, - "node_modules/collapse-white-space": { - "version": "1.0.6", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/collect-v8-coverage": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", @@ -4745,9 +4741,9 @@ } }, "node_modules/default-browser/node_modules/execa": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-7.1.1.tgz", - "integrity": "sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", + "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==", "dev": true, "dependencies": { "cross-spawn": "^7.0.3", @@ -5486,9 +5482,9 @@ } }, "node_modules/eslint-plugin-github": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-4.9.2.tgz", - "integrity": "sha512-osez6Sio/fLr/3QkW5HE1wbCOcmYG5030/6QIa9IcKyyfchewlecdnYcsbeUMUtdIiU9lWqhroQp2H/O7auxBA==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-4.10.0.tgz", + "integrity": "sha512-YKtqBtFbjih1wZNTwZjtLPEG6B/4ySMa38fgOo/rbMJpNKO3+OaKzwwOYkeKx/FapM/4MsTP9ExqUcDV+dkixA==", "dev": true, "dependencies": { "@github/browserslist-config": "^1.0.0", @@ -6273,7 +6269,8 @@ }, "node_modules/extend": { "version": "3.0.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, "node_modules/extend-shallow": { "version": "2.0.1", @@ -7981,6 +7978,17 @@ "node": ">=8" } }, + "node_modules/is-plain-obj": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", + "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-plain-object": { "version": "5.0.0", "dev": true, @@ -8111,22 +8119,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-whitespace-character": { - "version": "1.0.4", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/is-word-character": { - "version": "1.0.4", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/is-wsl": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", @@ -9950,14 +9942,6 @@ "version": "0.1.0", "dev": true }, - "node_modules/markdown-escapes": { - "version": "1.0.4", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/markdown-it": { "version": "13.0.1", "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-13.0.1.tgz", @@ -13665,6 +13649,24 @@ "inline-style-parser": "0.1.1" } }, + "node_modules/react-markdown/node_modules/unified": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz", + "integrity": "sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==", + "dependencies": { + "@types/unist": "^2.0.0", + "bail": "^2.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^4.0.0", + "trough": "^2.0.0", + "vfile": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/react-markdown/node_modules/unist-util-visit": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", @@ -13956,6 +13958,24 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/rehype-highlight/node_modules/unified": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz", + "integrity": "sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==", + "dependencies": { + "@types/unist": "^2.0.0", + "bail": "^2.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^4.0.0", + "trough": "^2.0.0", + "vfile": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/rehype-highlight/node_modules/unist-util-visit": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", @@ -13996,12 +14016,31 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/rehype-raw/node_modules/unified": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz", + "integrity": "sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==", + "dependencies": { + "@types/unist": "^2.0.0", + "bail": "^2.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^4.0.0", + "trough": "^2.0.0", + "vfile": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/rehype-slug": { - "version": "5.0.1", - "license": "MIT", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/rehype-slug/-/rehype-slug-5.1.0.tgz", + "integrity": "sha512-Gf91dJoXneiorNEnn+Phx97CO7oRMrpi+6r155tTxzGuLtm+QrI4cTwCa9e1rtePdL4i9tSO58PeSS6HWfgsiw==", "dependencies": { "@types/hast": "^2.0.0", - "github-slugger": "^1.1.1", + "github-slugger": "^2.0.0", "hast-util-has-property": "^2.0.0", "hast-util-heading-rank": "^2.0.0", "hast-util-to-string": "^2.0.0", @@ -14013,9 +14052,23 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/rehype-slug/node_modules/github-slugger": { - "version": "1.5.0", - "license": "ISC" + "node_modules/rehype-slug/node_modules/unified": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz", + "integrity": "sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==", + "dependencies": { + "@types/unist": "^2.0.0", + "bail": "^2.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^4.0.0", + "trough": "^2.0.0", + "vfile": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } }, "node_modules/rehype-slug/node_modules/unist-util-visit": { "version": "4.1.2", @@ -14045,8 +14098,9 @@ } }, "node_modules/rehype-stringify": { - "version": "9.0.3", - "license": "MIT", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/rehype-stringify/-/rehype-stringify-9.0.4.tgz", + "integrity": "sha512-Uk5xu1YKdqobe5XpSskwPvo1XeHUUucWEQSl8hTrXt5selvca1e8K1EZ37E6YoZ4BT8BCqCdVfQW7OfHfthtVQ==", "dependencies": { "@types/hast": "^2.0.0", "hast-util-to-html": "^8.0.0", @@ -14057,6 +14111,24 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/rehype-stringify/node_modules/unified": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz", + "integrity": "sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==", + "dependencies": { + "@types/unist": "^2.0.0", + "bail": "^2.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^4.0.0", + "trough": "^2.0.0", + "vfile": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/remark-gemoji-to-emoji": { "version": "1.1.0", "license": "MIT", @@ -14097,131 +14169,33 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/remark-parse": { - "version": "10.0.1", - "license": "MIT", - "dependencies": { - "@types/mdast": "^3.0.0", - "mdast-util-from-markdown": "^1.0.0", - "unified": "^10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/remark-parse-no-trim": { - "version": "8.0.4", - "license": "MIT", + "node_modules/remark-gfm/node_modules/unified": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz", + "integrity": "sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==", "dependencies": { - "ccount": "^1.0.0", - "collapse-white-space": "^1.0.2", - "is-alphabetical": "^1.0.0", - "is-decimal": "^1.0.0", - "is-whitespace-character": "^1.0.0", - "is-word-character": "^1.0.0", - "markdown-escapes": "^1.0.0", - "parse-entities": "^2.0.0", - "repeat-string": "^1.5.4", - "state-toggle": "^1.0.0", - "trim-trailing-lines": "^1.0.0", - "unherit": "^1.0.4", - "unist-util-remove-position": "^2.0.0", - "vfile-location": "^3.0.0", - "xtend": "^4.0.1" + "@types/unist": "^2.0.0", + "bail": "^2.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^4.0.0", + "trough": "^2.0.0", + "vfile": "^5.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" } }, - "node_modules/remark-parse-no-trim/node_modules/ccount": { - "version": "1.1.0", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/remark-parse-no-trim/node_modules/character-entities": { - "version": "1.2.4", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/remark-parse-no-trim/node_modules/character-entities-legacy": { - "version": "1.1.4", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/remark-parse-no-trim/node_modules/character-reference-invalid": { - "version": "1.1.4", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/remark-parse-no-trim/node_modules/is-alphabetical": { - "version": "1.0.4", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/remark-parse-no-trim/node_modules/is-alphanumerical": { - "version": "1.0.4", - "license": "MIT", - "dependencies": { - "is-alphabetical": "^1.0.0", - "is-decimal": "^1.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/remark-parse-no-trim/node_modules/is-decimal": { - "version": "1.0.4", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/remark-parse-no-trim/node_modules/is-hexadecimal": { - "version": "1.0.4", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/remark-parse-no-trim/node_modules/parse-entities": { - "version": "2.0.0", - "license": "MIT", + "node_modules/remark-parse": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-10.0.2.tgz", + "integrity": "sha512-3ydxgHa/ZQzG8LvC7jTXccARYDcRld3VfcgIIFs7bI6vbRSxJJmzgLEIIoYKyrfhaY+ujuWaf/PJiMZXoiCXgw==", "dependencies": { - "character-entities": "^1.0.0", - "character-entities-legacy": "^1.0.0", - "character-reference-invalid": "^1.0.0", - "is-alphanumerical": "^1.0.0", - "is-decimal": "^1.0.0", - "is-hexadecimal": "^1.0.0" + "@types/mdast": "^3.0.0", + "mdast-util-from-markdown": "^1.0.0", + "unified": "^10.0.0" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/remark-parse-no-trim/node_modules/vfile-location": { - "version": "3.2.0", - "license": "MIT", "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" @@ -14335,6 +14309,24 @@ "micromark-util-symbol": "^1.0.0" } }, + "node_modules/remark-parse/node_modules/unified": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz", + "integrity": "sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==", + "dependencies": { + "@types/unist": "^2.0.0", + "bail": "^2.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^4.0.0", + "trough": "^2.0.0", + "vfile": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/remark-rehype": { "version": "10.1.0", "license": "MIT", @@ -14368,6 +14360,24 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/remark-rehype/node_modules/unified": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz", + "integrity": "sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==", + "dependencies": { + "@types/unist": "^2.0.0", + "bail": "^2.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^4.0.0", + "trough": "^2.0.0", + "vfile": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/remark-rehype/node_modules/unist-util-visit": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", @@ -14395,13 +14405,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/repeat-string": { - "version": "1.6.1", - "license": "MIT", - "engines": { - "node": ">=0.10" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -15185,14 +15188,6 @@ "node": ">=12.0.0" } }, - "node_modules/state-toggle": { - "version": "1.0.3", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/stdin-discarder": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.1.0.tgz", @@ -15818,14 +15813,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/trim-trailing-lines": { - "version": "1.1.4", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/trough": { "version": "2.0.2", "license": "MIT", @@ -16048,43 +16035,66 @@ "dev": true, "license": "MIT" }, - "node_modules/unherit": { - "version": "1.1.3", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.0", - "xtend": "^4.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, "node_modules/unified": { - "version": "10.1.2", - "license": "MIT", + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/unified/-/unified-11.0.3.tgz", + "integrity": "sha512-jlCV402P+YDcFcB2VcN/n8JasOddqIiaxv118wNBoZXEhOn+lYG7BR4Bfg2BwxvlK58dwbuH2w7GX2esAjL6Mg==", "dependencies": { - "@types/unist": "^2.0.0", + "@types/unist": "^3.0.0", "bail": "^2.0.0", + "devlop": "^1.0.0", "extend": "^3.0.0", - "is-buffer": "^2.0.0", "is-plain-obj": "^4.0.0", "trough": "^2.0.0", - "vfile": "^5.0.0" + "vfile": "^6.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" } }, - "node_modules/unified/node_modules/is-plain-obj": { + "node_modules/unified/node_modules/@types/unist": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.0.tgz", + "integrity": "sha512-MFETx3tbTjE7Uk6vvnWINA/1iJ7LuMdO4fcq8UfF0pRbj01aGLduVvQcRyswuACJdpnHgg8E3rQLhaRdNEJS0w==" + }, + "node_modules/unified/node_modules/unist-util-stringify-position": { "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=12" + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", + "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", + "dependencies": { + "@types/unist": "^3.0.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unified/node_modules/vfile": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.1.tgz", + "integrity": "sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unified/node_modules/vfile-message": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.2.tgz", + "integrity": "sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, "node_modules/unist-util-find-after": { @@ -16139,50 +16149,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/unist-util-remove-position": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "unist-util-visit": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-remove-position/node_modules/unist-util-is": { - "version": "4.1.0", - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-remove-position/node_modules/unist-util-visit": { - "version": "2.0.3", - "license": "MIT", - "dependencies": { - "@types/unist": "^2.0.0", - "unist-util-is": "^4.0.0", - "unist-util-visit-parents": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-remove-position/node_modules/unist-util-visit-parents": { - "version": "3.1.1", - "license": "MIT", - "dependencies": { - "@types/unist": "^2.0.0", - "unist-util-is": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/unist-util-remove/node_modules/@types/unist": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.0.tgz", diff --git a/package.json b/package.json index 8509ede3c85d..780403e1f8ce 100644 --- a/package.json +++ b/package.json @@ -117,16 +117,14 @@ "port-used": "^2.0.8", "react": "18.2.0", "react-dom": "18.2.0", - "react-markdown": "^8.0.3", "react-syntax-highlighter": "^15.5.0", "rehype-highlight": "^6.0.0", "rehype-raw": "^6.1.1", - "rehype-slug": "^5.0.1", - "rehype-stringify": "^9.0.3", + "rehype-slug": "^5.1.0", + "rehype-stringify": "^9.0.4", "remark-gemoji-to-emoji": "^1.1.0", "remark-gfm": "^3.0.1", - "remark-parse": "^10.0.1", - "remark-parse-no-trim": "^8.0.4", + "remark-parse": "^10.0.2", "remark-rehype": "^10.1.0", "rss-parser": "^3.13.0", "scroll-anchoring": "^0.1.0", @@ -136,7 +134,7 @@ "strip-html-comments": "^1.0.0", "styled-components": "^5.3.5", "swr": "^2.0.0", - "unified": "^10.1.2", + "unified": "^11.0.3", "unist-util-visit": "^5.0.0", "url-template": "^3.0.0", "walk-sync": "^3.0.0" diff --git a/src/content-render/unified/processor.js b/src/content-render/unified/processor.js index f9eabc29a4c3..d47d27b023c6 100644 --- a/src/content-render/unified/processor.js +++ b/src/content-render/unified/processor.js @@ -1,6 +1,5 @@ import { unified } from 'unified' -import markdown from 'remark-parse-no-trim' -import markdownNext from 'remark-parse' +import remarkParse from 'remark-parse' import gfm from 'remark-gfm' import emoji from 'remark-gemoji-to-emoji' import remark2rehype from 'remark-rehype' @@ -29,8 +28,8 @@ import annotate from './annotate.js' export function createProcessor(context) { return ( unified() - .use(process.env.COMMONMARK ? markdownNext : markdown) - .use(process.env.COMMONMARK ? gfm : null) + .use(remarkParse) + .use(gfm) // Markdown AST below vvv .use(parseInfoString) .use(emoji) @@ -61,8 +60,8 @@ export function createProcessor(context) { export function createMinimalProcessor(context) { return unified() - .use(process.env.COMMONMARK ? markdownNext : markdown) - .use(process.env.COMMONMARK ? gfm : null) + .use(remarkParse) + .use(gfm) .use(remark2rehype, { allowDangerousHtml: true }) .use(slug) .use(raw) diff --git a/tests/rendering-fixtures/liquid.js b/tests/rendering-fixtures/liquid.js index e4979c7ccd84..d6ce05b34321 100644 --- a/tests/rendering-fixtures/liquid.js +++ b/tests/rendering-fixtures/liquid.js @@ -125,7 +125,7 @@ describe('rowheaders', () => { // td // td // - // (and there are 4 of these