8000 Too many blank lines. · Issue #13 · Shoes3/ebook · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

Too many blank lines. #13

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

Open
ccoupe opened this issue Jan 3, 2017 · 4 comments
Open

Too many blank lines. #13

ccoupe opened this issue Jan 3, 2017 · 4 comments
Milestone

Comments

@ccoupe
Copy link
Member
ccoupe commented Jan 3, 2017

After a header #, ##, ###.. there are two many lines in the Shoes representation.

Also, one blank line to separate markdown paragraphs often has two Shoes blank lines.

It really shows up using the simple test file, the README.md of the ebook project.
blank-lines

@IanTrudel IanTrudel added this to the 1.0.0 milestone Jan 3, 2017
@IanTrudel
Copy link
Collaborator
IanTrudel commented Jan 3, 2017

The problem seems relatively straightforward: the text from the Markdown is converted to para, which is really a paragraph with its own spacing, so the blank lines also get their own para/paragraph. It comes to reason that our converter should skip altogether those lines. Comment out the para in convert_blank and see if it fixes the problem.

By the way, Kramdown has an interesting approach involving looking into the parse tree using opts[:parent]. It's also possible to look into :index, :prev and :next as you can see here. It's not going to be helpful here but thought you might like to know.

@ccoupe
Copy link
Member Author
ccoupe commented Jan 3, 2017

Neutering convert_blank does help. There is still an issue with more vertical space than needed when it encounters a header. Thanks.

@IanTrudel
Copy link
Collaborator

Comparing Shoes Manual and a simple test program seems pretty close. The spacing always been a tad more for headers. Are you having a different result?

image

image

@ccoupe
Copy link
Member Author
ccoupe commented Jan 3, 2017

It's acceptable now but it could be tweaked a little bette, for example. Md also goes to six header levels.

ccoupe pushed a commit that referenced this issue Jan 4, 2017
* allow very simple md files to be used as opposed to complex github
  multi-document arrangements.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0