Skip to content
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

Extra Vertical Whitespace #23

Open
conspiracyhypo opened this issue Jul 6, 2015 · 0 comments
Open

Extra Vertical Whitespace #23

conspiracyhypo opened this issue Jul 6, 2015 · 0 comments
Labels

Comments

@conspiracyhypo
Copy link

The following HTML tags generate unwanted paragraph breaks ("[P]"):

  1. "some
    text" becomes "some [P][P] text" (2 line breaks, where I only want one)
  2. "bold text" becomes "[P]bold text[P]" (2 line breaks where I want zero)
  3. "italic text" becomes "[P]italic text[P]" (2 line breaks where I want zero)

Possible Cause: Examining an output docx shows that the tags (
, , ) are treated as distinct paragraphs. i.e. the current paragraph terminates, the gets wrapped in <w:p> wordml tags, then another paragraph is started for whatever text comes immediately after the closing .

Use case: Including bold or italic text in an AMA-style journal citation.

Environment info: Htmltoword 0.4.2, Rails 4.1.5, Ruby 2.1.5. Issue replicated on both OSX Yosemite and Ubuntu 14.04.

 [update] - Newlines in the input affect the output too.
 Probably a consequence of xslt treating all input as an XML document,
 since that's what XSLT is designed to do.

 e.g. "some text" shows in the output docx as "some text", but 
 "some 
 text"
 becomes "some[CR]text" in the docx.
@anitsirc anitsirc added the bug label Jul 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants