Economist apparently uses <small> for multi word phrases as well

Le bubbling sigh
This commit is contained in:
Kovid Goyal 2022-06-04 15:13:34 +05:30
parent 303380ba37
commit f192171922
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 2 additions and 2 deletions

View File

@ -222,7 +222,7 @@ class Economist(BasicNewsRecipe):
x.getparent().remove(x) x.getparent().remove(x)
# the economist uses <small> for small caps with a custom font # the economist uses <small> for small caps with a custom font
for x in root.xpath('//small'): for x in root.xpath('//small'):
if x.text and len(x.text.split()) == 1 and len(x) == 0: if x.text and len(x) == 0:
x.text = x.text.upper() x.text = x.text.upper()
x.tag = 'span' x.tag = 'span'
x.set('style', 'font-variant: small-caps') x.set('style', 'font-variant: small-caps')

View File

@ -222,7 +222,7 @@ class Economist(BasicNewsRecipe):
x.getparent().remove(x) x.getparent().remove(x)
# the economist uses <small> for small caps with a custom font # the economist uses <small> for small caps with a custom font
for x in root.xpath('//small'): for x in root.xpath('//small'):
if x.text and len(x.text.split()) == 1 and len(x) == 0: if x.text and len(x) == 0:
x.text = x.text.upper() x.text = x.text.upper()
x.tag = 'span' x.tag = 'span'
x.set('style', 'font-variant: small-caps') x.set('style', 'font-variant: small-caps')