feat(ui): finalize E-TIB modernization with footer redesign, video optimization, and TS fixes
Former-commit-id: 67ac02c8404cc66893fdf97308574701cca6000c
This commit is contained in:
Generated
Vendored
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../decode-named-character-reference@1.3.0/node_modules/decode-named-character-reference
|
||||
Generated
Vendored
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../micromark-util-decode-numeric-character-reference@2.0.2/node_modules/micromark-util-decode-numeric-character-reference
|
||||
Generated
Vendored
+45
@@ -0,0 +1,45 @@
|
||||
import { decodeNamedCharacterReference } from 'decode-named-character-reference';
|
||||
import { decodeNumericCharacterReference } from 'micromark-util-decode-numeric-character-reference';
|
||||
const characterEscapeOrReference = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
|
||||
|
||||
/**
|
||||
* Decode markdown strings (which occur in places such as fenced code info
|
||||
* strings, destinations, labels, and titles).
|
||||
*
|
||||
* The “string” content type allows character escapes and -references.
|
||||
* This decodes those.
|
||||
*
|
||||
* @param {string} value
|
||||
* Value to decode.
|
||||
* @returns {string}
|
||||
* Decoded value.
|
||||
*/
|
||||
export function decodeString(value) {
|
||||
return value.replace(characterEscapeOrReference, decode);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} $0
|
||||
* Match.
|
||||
* @param {string} $1
|
||||
* Character escape.
|
||||
* @param {string} $2
|
||||
* Character reference.
|
||||
* @returns {string}
|
||||
* Decoded value
|
||||
*/
|
||||
function decode($0, $1, $2) {
|
||||
if ($1) {
|
||||
// Escape.
|
||||
return $1;
|
||||
}
|
||||
|
||||
// Reference.
|
||||
const head = $2.charCodeAt(0);
|
||||
if (head === 35) {
|
||||
const head = $2.charCodeAt(1);
|
||||
const hex = head === 120 || head === 88;
|
||||
return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10);
|
||||
}
|
||||
return decodeNamedCharacterReference($2) || $0;
|
||||
}
|
||||
Generated
Vendored
+63
@@ -0,0 +1,63 @@
|
||||
{
|
||||
"name": "micromark-util-decode-string",
|
||||
"version": "2.0.1",
|
||||
"description": "micromark utility to decode markdown strings",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"micromark",
|
||||
"util",
|
||||
"utility",
|
||||
"decode",
|
||||
"character",
|
||||
"reference",
|
||||
"escape",
|
||||
"string"
|
||||
],
|
||||
"repository": "https://github.com/micromark/micromark/tree/main/packages/micromark-util-decode-string",
|
||||
"bugs": "https://github.com/micromark/micromark/issues",
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
|
||||
"contributors": [
|
||||
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"files": [
|
||||
"dev/",
|
||||
"index.d.ts.map",
|
||||
"index.d.ts",
|
||||
"index.js"
|
||||
],
|
||||
"exports": {
|
||||
"development": "./dev/index.js",
|
||||
"default": "./index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"micromark-util-character": "^2.0.0",
|
||||
"micromark-util-decode-numeric-character-reference": "^2.0.0",
|
||||
"micromark-util-symbol": "^2.0.0",
|
||||
"decode-named-character-reference": "^1.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "micromark-build"
|
||||
},
|
||||
"xo": {
|
||||
"envs": [
|
||||
"shared-node-browser"
|
||||
],
|
||||
"prettier": true,
|
||||
"rules": {
|
||||
"unicorn/prefer-code-point": "off",
|
||||
"unicorn/prefer-string-replace-all": "off"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user