shithub: werc

Download patch

ref: 125c23452f36568ba3dafd258dfcab3b609c360e
parent: 9e1601f30ad78aa94a7e081d23ea693902f60b97
author: Uriel <u@berlinblue.org>
date: Thu Jun 30 18:58:17 EDT 2011

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

--- a/bin/werclib.rc
+++ b/bin/werclib.rc
@@ -102,7 +102,7 @@
 
     # 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
 }