Skip to content
This repository has been archived by the owner on Jun 3, 2020. It is now read-only.

Markdown output wraps at 80 characters #6

Open
albill opened this issue Sep 17, 2011 · 9 comments
Open

Markdown output wraps at 80 characters #6

albill opened this issue Sep 17, 2011 · 9 comments

Comments

@albill
Copy link

albill commented Sep 17, 2011

The markdown output files that the script creates from my wordpress.xml all wrap normal text paragraphs are 80 characters (or less if a word will go across the boundary). Unfortunately, when I import this into my Jekyll blog (or any other markdown interpreter), these new lines are preserved. So, rather than getting paragraphs naturally following screen width when converted from markdown to HTML, I get formatting that is wrapped at the same point.

The only except seems to be image urls, which are not wrapped.

Can the script be updated to not wrap lines at 80 characters?

@thomasf
Copy link
Collaborator

thomasf commented Oct 3, 2011

It should really not do this.. Strange.

@thomasf thomasf closed this as completed Oct 3, 2011
@thomasf thomasf reopened this Oct 3, 2011
@albill
Copy link
Author

albill commented Oct 3, 2011

Do you see it?

It made me wind up using a more convoluted (and less useful) method to get data because I didn't have a means of differentiating "wraps at 80" with wanted linebreaks.

@jamesward
Copy link
Contributor

I'm having this same problem.

@jamesward
Copy link
Contributor

I was able to fix this by switching to html2text_file instead of html2text.

@chrisnicola
Copy link

@jamesward could you be more specific about what you've changed. Simply changing the method call doesn't work for me.

@chrisnicola
Copy link

Ok I've solved it. First off the latest html2text doesn't have html2text_file and also causes a whole bunch of additional problems (all the links are inline instead of reference style for example). So you have to get a pre 3.x version. Then you also have to use html2text_file since that solves the problem with 80 character wrapping even with the reference links. I'll submit a pull request of course ;-).

@jamesward
Copy link
Contributor

You can see my fork here: https://github.com/jamesward/exitwp

@gerwitz
Copy link

gerwitz commented Jan 22, 2012

@jamesward thanks! Your shift to html2text_file and exception handling was exactly what I needed.

@thomasf
Copy link
Collaborator

thomasf commented Apr 9, 2012

Pandoc is one of the best parsers i've tried.. thinking of bringing it back instead of html2text.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants