Skip to content

Commit 0c0863b

Browse files
authored
Update build.sh
1 parent 8428259 commit 0c0863b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,17 @@ for file in "$SRC_DIR"/*.user.js; do
9999
install_badge="[![install standard](https://img.shields.io/badge/install-standard-006400)]($DOWNLOAD_URL_DIST)"
100100
install_min_badge="[![install minified](https://img.shields.io/badge/install-minified-64962a)]($DOWNLOAD_URL_DIST_MIN)"
101101
version_badge="[![version](https://img.shields.io/badge/version-$script_version-blue)](../../../../blame/main/$DIST_DIR/$id.user.js)"
102-
printf '%s %s %s' "$install_badge" "$install_min_badge" "$version_badge" >> "$doc_file"
102+
printf '%s\n%s\n%s\n' "$install_badge" "$install_min_badge" "$version_badge" >> "$doc_file"
103103

104104
loc_count=$(npx cloc --quiet --sum-one --stdin-name="$id.user.js" - <<< "$body" | grep -m 1 'SUM:' | awk '{print $5}')
105105
loc_count_badge="[![lines of code](https://img.shields.io/badge/loc-$loc_count-orange)](../../$DIST_DIR/$id.user.js)"
106-
printf ' %s\n\n' "$loc_count_badge" >> "$doc_file"
106+
printf '%s\n\n' "$loc_count_badge" >> "$doc_file"
107107
((loc_count_total += loc_count))
108108

109109
printf '%s' "${readme_comment:+$'## Info\n'"$(sed '1d;$d' <<< "$readme_comment")"$'\n\n'}" >> "$doc_file"
110110

111111
screenshots="$(find "$SCREENSHOTS_DIR" -type f -iname "$id-*.*" -printf '%f\n' | sort)"
112-
printf '%s' "${screenshots:+$'## Screenshots\n'"$(sed -E 's|(.*)|![screenshot](screenshots/\1)|' <<< "$screenshots")"}" >> "$doc_file"
112+
printf '%s' "${screenshots:+$'## Screenshots\n<p align="center">\n'"$(sed -E 's|(.*)| <img src="screenshots/\1" alt="screenshot" align="middle">|' <<< "$screenshots")"$'</p>'}" >> "$doc_file"
113113

114114
# --- 5. ADD ROW TO README TABLE ---
115115
escaped_script_name="$(sed 's#|#\\|#g' <<< "$script_name")"

0 commit comments

Comments
 (0)