File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,20 @@ function _remove_deprecated_links_meta_from_html_files {
42
42
}
43
43
44
44
45
+ function _remove_google_analytics {
46
+ printf " \e[1m\e[7m %-80s\e[0m\n" \
47
+ ' Remove Google Analytics'
48
+ for _file in $( find docs -type f -name ' *.html' )
49
+ do
50
+ ${SED} \
51
+ --null-data \
52
+ -e' s#<!-- Begin Google.*<!-- End Google Analytics -->##' \
53
+ --in-place " ${_file} "
54
+ done
55
+ echo
56
+ }
57
+
58
+
45
59
function _cleanup_plaintext_whitespace {
46
60
printf " \e[1m\e[7m %-80s\e[0m\n" ' Clean-up whitespace in plaintext files'
47
61
# plaintext files with trailing whitespace
@@ -58,4 +72,5 @@ function _cleanup_plaintext_whitespace {
58
72
cd " ${0%/* } /.." > /dev/null
59
73
# Run clean-up functions
60
74
_remove_deprecated_links_meta_from_html_files
75
+ _remove_google_analytics
61
76
_cleanup_plaintext_whitespace
You can’t perform that action at this time.
0 commit comments