@@ -313,7 +313,7 @@ def process_text(self, el, parent_tags=None):
313
313
if (should_remove_whitespace_outside (el .previous_sibling )
314
314
or (should_remove_whitespace_inside (el .parent )
315
315
and not el .previous_sibling )):
316
- text = text .lstrip ()
316
+ text = text .lstrip (' \t \r \n ' )
317
317
if (should_remove_whitespace_outside (el .next_sibling )
318
318
or (should_remove_whitespace_inside (el .parent )
319
319
and not el .next_sibling )):
@@ -399,7 +399,7 @@ def convert_a(self, el, text, parent_tags):
399
399
400
400
def convert_blockquote (self , el , text , parent_tags ):
401
401
# handle some early-exit scenarios
402
- text = (text or '' ).strip ()
402
+ text = (text or '' ).strip (' \t \r \n ' )
403
403
if '_inline' in parent_tags :
404
404
return ' ' + text + ' '
405
405
if not text :
@@ -567,8 +567,8 @@ def _indent_for_li(match):
567
567
568
568
def convert_p (self , el , text , parent_tags ):
569
569
if '_inline' in parent_tags :
570
- return ' ' + text .strip () + ' '
571
- text = text .strip ()
570
+ return ' ' + text .strip (' \t \r \n ' ) + ' '
571
+ text = text .strip (' \t \r \n ' )
572
572
if self .options ['wrap' ]:
573
573
# Preserve newlines (and preceding whitespace) resulting
574
574
# from <br> tags. Newlines in the input have already been
@@ -577,7 +577,7 @@ def convert_p(self, el, text, parent_tags):
577
577
lines = text .split ('\n ' )
578
578
new_lines = []
579
579
for line in lines :
580
- line = line .lstrip ()
580
+ line = line .lstrip (' \t \r \n ' )
581
581
line_no_trailing = line .rstrip ()
582
582
trailing = line [len (line_no_trailing ):]
583
583
line = fill (line ,
0 commit comments