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 spaces are being inserted for inline code view #288

Closed
newbreedofgeek opened this issue Nov 26, 2014 · 8 comments · Fixed by #292
Closed

Extra spaces are being inserted for inline code view #288

newbreedofgeek opened this issue Nov 26, 2014 · 8 comments · Fixed by #292
Assignees
Labels
Milestone

Comments

@newbreedofgeek
Copy link

When I moved to 0.4.0, I noticed that in the generated docs, all my code samples had a whole lot of whitespace inserted in the markup before the first character started.

This is not a CSS styling thing, by looking at the DOM object you can see physical whitespace.

I downgraded to 0.3.50 and this issue is not found here, so its a problem in 0.4.0.

Not exactly sure where the issue is but i will try and investigate and get more details to attach.

@okuryu
Copy link
Member

okuryu commented Nov 26, 2014

Thanks for your report! (To be clear, previous version is 0.3.50 not 0.5.50.)

It would be very helpful if you could provide a reproducible example.

@newbreedofgeek
Copy link
Author

My mistake.. I have updated it to 0.3.50

I will try and attach more details within the next few days.

@newbreedofgeek
Copy link
Author

I've forked the project and have been playing around with the code to see if I can find an issue.

Here is what I know so far:

  1. Basically, in 0.4.0 when the source files are generated into the "files" view and prettify applied to it, there is a whole bunch of whitespace before the start of each line. like so:

screen shot 2014-12-01 at 3 35 26 pm

  1. I've tried to trace the source of the issue, and I don't think its an issue with prettify, instead it may be an issue with handlebars template (possibly files.handlebars). I think this is the case, because if I comment of prettify, then the innerHTML for the code renders like so in the DOM

screen shot 2014-12-01 at 3 38 42 pm

  1. Due to this excess whitespace, prettify just includes it which throws off the end result.

I'm sure I'll find the problem soon.. will keep you posted.

@newbreedofgeek
Copy link
Author

Please ignore the close, I accidentally did that. Its reopened again.

newbreedofgeek added a commit to newbreedofgeek/yuidoc that referenced this issue Dec 1, 2014
…pace to be inserted into inline code templates.
@newbreedofgeek
Copy link
Author

I traced the issue to YUI version 3.18.1 and 3.18.0

Last working version is 3.17.2.

I've open a pull request to hopefully merge this into the future:
#290

Any questions pls let me know.

Thanks.

@okuryu
Copy link
Member

okuryu commented Dec 1, 2014

Thanks! I confirmed to reproduce this issue, I'll take a look detail in this week.

@okuryu okuryu added the bug label Dec 1, 2014
@okuryu okuryu self-assigned this Dec 1, 2014
okuryu added a commit to okuryu/yuidoc that referenced this issue Dec 2, 2014
This PR fixes yui#288. This problem is due to `Y.Handlebars` have been
upgraded from v1.x to v2.0.0 since YUI 3.18.0.

Handlebars v2.0.0 have been changed the handling of indents to matches
to the Mustache specs.
https://github.com/wycats/handlebars.js/blob/master/release-notes.md

Therefore, it fixes indents of templates and I'd like to make clear
YUIDoc uses Handlebars v2.0.0 by depending on YUI 3.18.1 or later.
@okuryu
Copy link
Member

okuryu commented Dec 2, 2014

I created a new PR for this. See #292.

@okuryu
Copy link
Member

okuryu commented Dec 4, 2014

#292 have been merged. It'll be available in the next release.

okuryu added a commit to okuryu/yuidoc that referenced this issue Dec 21, 2014
This resolves yui#300, this issue arises from the same causes as yui#288.
@okuryu okuryu modified the milestone: v0.5.0 Dec 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants