mirror of
https://github.com/ZetaKebab/quartz.git
synced 2025-06-22 08:44:36 +00:00
Squashed 'custom/convert-usage/' changes from 89c8624..bbefbc5
bbefbc5 Added usage 8be4d39 Fixed an issue with character encoding git-subtree-dir: custom/convert-usage git-subtree-split: bbefbc5dd202ca299e1760f6934ace79ba320499
This commit is contained in:
@ -29,7 +29,9 @@ def write_file(filename, text):
|
||||
### Replace ###
|
||||
|
||||
def convert_pattern(text):
|
||||
text = re.sub(re_usage, '', text, flags=re.MULTILINE)
|
||||
text, success = re.subn(re_usage, '', text, flags=re.MULTILINE)
|
||||
if (success == 0):
|
||||
return text
|
||||
|
||||
soup = BeautifulSoup(text, features="html.parser")
|
||||
|
||||
@ -40,7 +42,7 @@ def convert_pattern(text):
|
||||
calloutTitle = BeautifulSoup(callout_title_html, features="html.parser")
|
||||
tag.insert_before(calloutTitle)
|
||||
|
||||
return str(soup)
|
||||
return (soup.decode(False, formatter=None))
|
||||
|
||||
|
||||
### Execution ###
|
||||
|
Reference in New Issue
Block a user