From 58d9f657358d398c4823f7480f9fac4ecc83d546 Mon Sep 17 00:00:00 2001 From: pictuga Date: Sat, 25 Feb 2017 18:14:13 -1000 Subject: [PATCH] readabilite: explain the use of .tail --- morss/readabilite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/morss/readabilite.py b/morss/readabilite.py index 5f8eab5..663ed3b 100644 --- a/morss/readabilite.py +++ b/morss/readabilite.py @@ -65,7 +65,7 @@ def score_node(node): score += len(regex_good.findall(class_id) * 4) score -= len(regex_bad.findall(class_id) * 3) - score += count_words(''.join([node.text or ''] + [x.tail or '' for x in node])) / 10. + score += count_words(''.join([node.text or ''] + [x.tail or '' for x in node])) / 10. # the .tail part is to include *everything* in that node return score