_html: Refine python script
This commit is contained in:
parent
0a28d67b81
commit
e9a6804c98
2
qsgen2
2
qsgen2
@ -878,7 +878,7 @@ def replace_qstags(match):
|
||||
return qstag_dict.get(qstag, qstag) # Replace or return unchanged
|
||||
|
||||
# Define the regular expression pattern for QStags
|
||||
pattern = r'#(?!link|image|ytvideo|updated|version)\w+'
|
||||
pattern = r'(?<=^|\s)(#(?!link|image|ytvideo|updated|version)\w+)'
|
||||
|
||||
# Replace QStags using the defined function
|
||||
result = re.sub(pattern, replace_qstags, '''$content''', flags=re.MULTILINE)
|
||||
|
Loading…
Reference in New Issue
Block a user