Ignore leading spaces/tabs when extracting a title from HTML files.

This commit is contained in:
Uriel 2011-06-30 22:58:17 +00:00
parent 10a7206fcf
commit 916eba13c9

View File

@ -102,7 +102,7 @@ fn get_html_title {
# As a backup we might want to pick the first 'non-tag' text in the file with:
if(~ $"t '')
t=`{sed -n -e 's/^(<[^>]+>)*([^<]+).*/\2/p; 32q' < $1 | sed 1q}
t=`{sed -n -e 's/^[ ]*(<[^>]+>)*([^<]+).*/\2/p; 32q' < $1 | sed 1q}
echo $t
}