shithub: werc

Download patch

ref: b4fc73806bd0b3df9373f8b667e2dbcb26b2f4a5
parent: 1ede072465c75b34f921797b313534668dc80a78
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
 }
--