Skip to content

Commit

Permalink
Handle linebreaks in parsel spans
Browse files Browse the repository at this point in the history
fixes #167
  • Loading branch information
entorb committed Jun 4, 2024
1 parent 0a7af8c commit a4ad53f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/ebook/step_6.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,10 @@ def fix_ellipsis(s: str) -> str:

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

# add css style file format for \emph in \emph
Expand Down

0 comments on commit a4ad53f

Please sign in to comment.