diff --git a/README.md b/README.md index b4453cf8..91bd33e3 100644 --- a/README.md +++ b/README.md @@ -113,8 +113,7 @@ DocxParser includes abstracts methods that each parser overwrites to satsify its @abstractmethod def table(self, text): - return text - + return text @abstractmethod def table_row(self, text): return text @@ -161,4 +160,16 @@ OR, let's say FOO is your new favorite markup language. Simply customize your ow def linebreak(self): return '!!!!!!!!!!!!' # because linebreaks in are denoted by '!!!!!!!!!!!!' - # with the FOO markup langauge :) \ No newline at end of file + # with the FOO markup langauge :) + +#Styles + +The base parser `Docx2Html` relies on certain css class being set for certain behaviour to occur. Currently these include: + +* class `insert` -> Turns the text green. +* class `delete` -> Turns the text red and draws a line through the text. +* class `center` -> Aligns the text to the center. +* class `right` -> Aligns the text to the right. +* class `left` -> Aligns the text to the left. +* class `comment` -> Turns the text blue. +* class `pydocx-underline` -> Underlines the text. diff --git a/pydocx/parsers/Docx2Html.py b/pydocx/parsers/Docx2Html.py index f97e39be..9aa78354 100644 --- a/pydocx/parsers/Docx2Html.py +++ b/pydocx/parsers/Docx2Html.py @@ -9,9 +9,6 @@ class Docx2Html(DocxParser): @property def parsed(self): content = self._parsed - content = content.replace('

', '
') - content = content.replace('


', '

') - content = content.replace('