Improved regex, highlighting and HTML conversion of bold and italic text. Reverting to old syntax for italic.

This commit is contained in:
Veronica K. B. Olsen
2020-06-29 12:15:49 +02:00
parent c572eb0d16
commit ceadfe1e5c
5 changed files with 59 additions and 51 deletions
+8
View File
@@ -34,6 +34,10 @@ from os import path, unlink, rmdir
logger = logging.getLogger(__name__)
# =========================================================================== #
# Simple Word Counter
# =========================================================================== #
def countWords(theText):
"""Count words in a piece of text, skipping special syntax and
comments.
@@ -80,6 +84,10 @@ def countWords(theText):
return charCount, wordCount, paraCount
# =========================================================================== #
# Convert an Integer to a Word Number
# =========================================================================== #
def numberToWord(numVal, theLanguage):
"""Wrapper for converting numbers to words for chapter headings.
"""