Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ebook fix: remove stray markup from the text (#172)
Before this commit, chapter 23 of the ebook had some spurious markup that found its way into the readable text: And Harry brought out the original parchment with the hypotheses, and began scribbling. plus .5minus 1 Observation: Wizardry isn’t as powerful now as it was when Hogwarts was founded. plus .5minus 1 You can see the source of this markup in the comment immediately above the line changed in this commit: # \vskip 1\baselineskip plus .5\textheight minus 1\baselineskip The problem is this regex: "\\vskip .*?\\baselineskip" In the example above, it matches `"\vskip 1\baselineskip"`, stopping at the first `"\baselineskip"` instead of the one at the end of the line. This leaves the errant bit of markup in the text: plus .5\textheight minus 1\baselineskip Which, because it does not start with a backslash, ends up inserted into the content. The fix is simple: remove the `'?'`, turning the `".*"` into a greedy match instead of a minimal match. This matches to the end of the last `"\baselineskip"`, completely removing this bit of markup from the text as intended.
- Loading branch information