swerc

anselm's simpler werc fork
git clone git://git.suckless.org/swerc
Log | Files | Refs | README

commit 8d6768666f215fe98ffbde88bdd1b0ee00de5b96
parent 413534c943c3337cbab5d0e06423a120626d3136
Author: Uriel <u@berlinblue.org>
Date:   Thu, 30 Jun 2011 22:58:17 +0000

Ignore leading spaces/tabs when extracting a title from HTML files.
Diffstat:
bin/werclib.rc | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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 }