Summary Files Commits Branches @commit @diff @stats
path: root / awk-edits / Svg-height-attrib.awk
blob: fe3027ac1afb3c38c6366ea5de7f3a37d75c0691 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#
# == About
#
# This script forces all images with SVG source to have a hard-coded height to them.
# This is mostly done for browsers that do not support CSS.

/src="[^"]*\.svg"/ {
	result = ""
	while(match($0, /src="[^"]*\.svg"/)) {
		result = result substr($0, 1, RSTART + RLENGTH - 1) " height=18";
		$0 = substr($0, RSTART + RLENGTH);
	}
	$0 = result $0;
}