Skip to content

Commit a4ad53f

Browse files
committed
Handle linebreaks in parsel spans
fixes #167
1 parent 0a7af8c commit a4ad53f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/ebook/step_6.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,10 @@ def fix_ellipsis(s: str) -> str:
141141

142142
# converting "color-marked" styles of 1.sh back to proper style classes
143143
cont = re.sub(
144-
r'<(div|span) style="color: (parsel|writtenNote|McGonagallWhiteBoard|headline)"', # noqa: E501
144+
r'<(div|span)\s+style="color:\s*(parsel|writtenNote|McGonagallWhiteBoard|headline)"',
145145
r'<\1 class="\2"',
146146
cont,
147+
flags=re.DOTALL,
147148
)
148149

149150
# add css style file format for \emph in \emph

0 commit comments

Comments
 (0)