Improved regex, highlighting and HTML conversion of bold and italic text. Reverting to old syntax for italic.
This commit is contained in:
@@ -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.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user