Fix bin/publish: copy docs.dist from project root

Fix bin/publish: use correct .env path for rspade_system
Fix bin/publish script: prevent grep exit code 1 from terminating script

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-10-21 02:08:33 +00:00
commit f6fac6c4bc
79758 changed files with 10547827 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
/**
* Utility to 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
* @returns {string}
*/
export function decodeString(value: string): string

View File

@@ -0,0 +1,47 @@
import {decodeNamedCharacterReference} from 'decode-named-character-reference'
import {decodeNumericCharacterReference} from 'micromark-util-decode-numeric-character-reference'
import {codes} from 'micromark-util-symbol/codes.js'
import {constants} from 'micromark-util-symbol/constants.js'
const characterEscapeOrReference =
/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi
/**
* Utility to 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
* @returns {string}
*/
export function decodeString(value) {
return value.replace(characterEscapeOrReference, decode)
}
/**
* @param {string} $0
* @param {string} $1
* @param {string} $2
* @returns {string}
*/
function decode($0, $1, $2) {
if ($1) {
// Escape.
return $1
}
// Reference.
const head = $2.charCodeAt(0)
if (head === codes.numberSign) {
const head = $2.charCodeAt(1)
const hex = head === codes.lowercaseX || head === codes.uppercaseX
return decodeNumericCharacterReference(
$2.slice(hex ? 2 : 1),
hex ? constants.numericBaseHexadecimal : constants.numericBaseDecimal
)
}
return decodeNamedCharacterReference($2) || $0
}