From b4fc73806bd0b3df9373f8b667e2dbcb26b2f4a5 Mon Sep 17 00:00:00 2001 From: Uriel Date: Thu, 30 Jun 2011 22:58:17 +0000 Subject: [PATCH] Ignore leading spaces/tabs when extracting a title from HTML files. --- bin/werclib.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/werclib.rc b/bin/werclib.rc index 8e272ef..a64ef40 100644 --- a/bin/werclib.rc +++ b/bin/werclib.rc @@ -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 }