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

every first line of a Markdown code block is rendering with 2 extra leading spaces #560

Closed
tim-sge opened this issue Oct 25, 2012 · 6 comments
Assignees
Labels
Milestone

Comments

@tim-sge
Copy link

tim-sge commented Oct 25, 2012

Using markdown, in code blocks that are defined with the 4-space leading indent, I am seeing 2 spaces inserted after the pre tag and before the code tag. This makes every first line render awkwardly.

I.e., View Source on the HTML shows something like this:

<pre>
  <code>

Seems like those 2 spaces should be stripped.

@bootstraponline
Copy link
Member

Would you provide an example that generates the awkward HTML?

@tim-sge
Copy link
Author

tim-sge commented Oct 26, 2012

Even the tiniest snippet at the top of otherwise empty page will do it.

E.g., this is good enough:

....foo
....bar

(where the periods are spaces)

Note that in preview mode it looks fine, it's only after it's saved and rendering in view mode that the stray prefix spaces on the first line of each code block appear.

@bootstraponline
Copy link
Member

It turned out to be an issue with nokogiri's to_xhtml method.

sparklemotion/nokogiri#530

@bootstraponline
Copy link
Member

The fix will be in the next gollum release.

@bootstraponline
Copy link
Member

Fixed in Gollum 2.3.4.

@tim-sge
Copy link
Author

tim-sge commented Nov 19, 2012

Thanks for addressing it!

existme pushed a commit to existme/gollum that referenced this issue Aug 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants