mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2025-12-06 08:52:55 +01:00
Fix remove_empty_p regexp to work with nested <br> tags and whitespace.
This commit is contained in:
parent
d2f69eb5d5
commit
74de62385f
3 changed files with 3 additions and 3 deletions
|
|
@ -323,7 +323,7 @@ conditionals_use_lists:true
|
|||
## they aren't intended by the author during document upload and not
|
||||
## all authors know how/take the time to fix it. This feature removes
|
||||
## all "empty" <p> tags, ie, those containing only whitespace or <br>
|
||||
## tags. Literally: <p[^>]*>\s*(<br/>)*\s*</p>
|
||||
## tags.
|
||||
#remove_empty_p: false
|
||||
|
||||
## If you have the Generate Cover plugin installed, you can use the
|
||||
|
|
|
|||
|
|
@ -880,7 +880,7 @@ class BaseSiteAdapter(Requestable):
|
|||
# Remove <p> tags that contain only whitespace and/or <br>
|
||||
# tags. Generally for AO3/OTW because their document
|
||||
# converter tends to add them where not intended.
|
||||
retval = re.sub(r"<p[^>]*>\s*(<br/>)*\s*</p>","",retval)
|
||||
retval = re.sub(r"<p[^>]*>\s*(\s*<br ?/?>\s*)*\s*</p>","",retval)
|
||||
|
||||
return retval
|
||||
|
||||
|
|
|
|||
|
|
@ -369,7 +369,7 @@ conditionals_use_lists:true
|
|||
## they aren't intended by the author during document upload and not
|
||||
## all authors know how/take the time to fix it. This feature removes
|
||||
## all "empty" <p> tags, ie, those containing only whitespace or <br>
|
||||
## tags. Literally: <p[^>]*>\s*(<br/>)*\s*</p>
|
||||
## tags.
|
||||
#remove_empty_p: false
|
||||
|
||||
## If set false, the summary will have all html stripped.
|
||||
|
|
|
|||
Loading…
Reference in a new issue