Compare commits
3 Commits
15d4d63f24
...
07583c8283
| Author | SHA1 | Date |
|---|---|---|
|
|
07583c8283 | |
|
|
6244aa39da | |
|
|
31dd0c5a38 |
|
|
@ -212,7 +212,9 @@ jobs:
|
|||
overall_fail=1
|
||||
fi
|
||||
|
||||
if grep -q "# BEGIN playbook .gitattributes" .gitattributes 2>/dev/null; then
|
||||
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
|
||||
echo "✅ .gitattributes 更新成功"
|
||||
else
|
||||
echo "❌ .gitattributes 更新失败"
|
||||
|
|
|
|||
|
|
@ -54,7 +54,10 @@ fi
|
|||
|
||||
timestamp="$(date +%Y%m%d%H%M%S 2>/dev/null || echo bak)"
|
||||
|
||||
mkdir -p "$PROJECT_ROOT"
|
||||
if [ ! -d "$PROJECT_ROOT" ]; then
|
||||
echo "ERROR: project root does not exist: $PROJECT_ROOT" >&2
|
||||
exit 1
|
||||
fi
|
||||
PROJECT_ROOT_ABS="$(CDPATH= cd -- "$PROJECT_ROOT" && pwd -P)"
|
||||
DEST_PREFIX="$PROJECT_ROOT_ABS/docs/standards/playbook"
|
||||
DEST_STANDARDS="$PROJECT_ROOT_ABS/docs/standards"
|
||||
|
|
|
|||
|
|
@ -100,13 +100,19 @@ extract_links() {
|
|||
|
||||
gsub(/`[^`]*`/, "", line)
|
||||
|
||||
while (match(line, /\[[^]]+\]\(([^)]+)\)/, m)) {
|
||||
print NR "\t" m[1]
|
||||
while (match(line, /\[[^]]+\]\([^)]*\)/)) {
|
||||
link = substr(line, RSTART, RLENGTH)
|
||||
sub(/^\[[^]]+\]\(/, "", link)
|
||||
sub(/\)$/, "", link)
|
||||
print NR "\t" link
|
||||
line = substr(line, RSTART + RLENGTH)
|
||||
}
|
||||
|
||||
if (match(line, /^\[[^]]+\]:[[:space:]]*(.+)/, ref)) {
|
||||
print NR "\t" ref[1]
|
||||
if (match(line, /^\[[^]]+\]:[[:space:]]*[^[:space:]]+/)) {
|
||||
link = substr(line, RSTART, RLENGTH)
|
||||
sub(/^\[[^]]+\]:[[:space:]]*/, "", link)
|
||||
sub(/[[:space:]].*$/, "", link)
|
||||
print NR "\t" link
|
||||
}
|
||||
}
|
||||
' "$1"
|
||||
|
|
|
|||
Loading…
Reference in New Issue