Skip to content

Stop using deprecated tags #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
May 21, 2013
Merged

Stop using deprecated tags #28

merged 10 commits into from
May 21, 2013

Conversation

jlward
Copy link
Contributor

@jlward jlward commented May 21, 2013

u, i, and b are all deprecated. Use <span style="text-decoration: underline;">, em, and strong instead.

In addition, all self closing tags should be in the form <%s /> with the space and the trailing slash.

@ghost ghost assigned jlward May 21, 2013

def underline(self, text):
return '<u>' + text + '</u>'
return '<span style="text-decoration: underline">' + text + '</span>'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than I direct style declaration, I think you would be better off by defining a set of CSS classes that pydocx will add to indicate things like this. Changing how those classes affect the output would be much easier than trying to strip out styles.

So how about class="pydocx-underline"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, for this pull request, you'll need to add a section to the readme about css classes used by the default HTML formatter that includes this.

@@ -9,9 +9,6 @@ class Docx2Html(DocxParser):
@property
def parsed(self):
content = self._parsed
content = content.replace('<p></p><p></p>', '<br />')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know we want to do this with PolicyStat. Is this already done somewhere else, or should it be added to your transition document?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was not really working very well to begin with. Really it should have been called in a loop until the html stopped changing. I believe that the semantinator handles some of this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Added that to your transition document.

@winhamwr
Copy link
Contributor

Looks good

jlward added a commit that referenced this pull request May 21, 2013
@jlward jlward merged commit 9142a9f into master May 21, 2013
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward added a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward pushed a commit that referenced this pull request Mar 14, 2014
jlward added a commit that referenced this pull request Mar 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants