Compare commits

..

No commits in common. "07583c8283f9d17523808a3b2a584007a930e200" and "15d4d63f24e5823ec3a44d4c36e7193e7bec4174" have entirely different histories.

3 changed files with 6 additions and 17 deletions

View File

@ -212,9 +212,7 @@ jobs:
overall_fail=1
fi
if grep -q "# BEGIN playbook .gitattributes" .gitattributes 2>/dev/null \
|| grep -q "# Added from playbook .gitattributes" .gitattributes 2>/dev/null \
|| grep -q "^\\* text=auto eol=lf" .gitattributes 2>/dev/null; then
if grep -q "# BEGIN playbook .gitattributes" .gitattributes 2>/dev/null; then
echo "✅ .gitattributes 更新成功"
else
echo "❌ .gitattributes 更新失败"

View File

@ -54,10 +54,7 @@ fi
timestamp="$(date +%Y%m%d%H%M%S 2>/dev/null || echo bak)"
if [ ! -d "$PROJECT_ROOT" ]; then
echo "ERROR: project root does not exist: $PROJECT_ROOT" >&2
exit 1
fi
mkdir -p "$PROJECT_ROOT"
PROJECT_ROOT_ABS="$(CDPATH= cd -- "$PROJECT_ROOT" && pwd -P)"
DEST_PREFIX="$PROJECT_ROOT_ABS/docs/standards/playbook"
DEST_STANDARDS="$PROJECT_ROOT_ABS/docs/standards"

View File

@ -100,19 +100,13 @@ extract_links() {
gsub(/`[^`]*`/, "", line)
while (match(line, /\[[^]]+\]\([^)]*\)/)) {
link = substr(line, RSTART, RLENGTH)
sub(/^\[[^]]+\]\(/, "", link)
sub(/\)$/, "", link)
print NR "\t" link
while (match(line, /\[[^]]+\]\(([^)]+)\)/, m)) {
print NR "\t" m[1]
line = substr(line, RSTART + RLENGTH)
}
if (match(line, /^\[[^]]+\]:[[:space:]]*[^[:space:]]+/)) {
link = substr(line, RSTART, RLENGTH)
sub(/^\[[^]]+\]:[[:space:]]*/, "", link)
sub(/[[:space:]].*$/, "", link)
print NR "\t" link
if (match(line, /^\[[^]]+\]:[[:space:]]*(.+)/, ref)) {
print NR "\t" ref[1]
}
}
' "$1"