Trailing space in code snippet breaks Attachments example #459

Open
therealplato opened this Issue Feb 16, 2012 · 10 comments

Comments

Projects
None yet
5 participants
@therealplato

In the Attachments section of page http://guide.couchdb.org/editions/1/en/api.html the first code snippet reads:

> curl -vX PUT http://127.0.0.1:5984/albums/6e1295ed6c29495e54cc05947f18c8af/ 
artwork.jpg?rev=2-2739352689 --data-binary @artwork.jpg -H "Content-Type: 
image/jpg"

The space at the end of the first line (between the ID and artwork.jpg) breaks the command. I understand the need to separate this onto multiple lines, but note that the final line image/jpg" does not have a trailing space, and the second line (correctly) does have a trailing space. (so it's probably not an artifact put there by the parsing code.)

I hilighted the command and noted that there was a space at the end so I figured it was supposed to be there. As someone totally new to REST it took me a while to realize that the artwork.jpg?rev=foo was actually part of the URL, not another argument to curl.

Please remove this trailing space! I searched issues for "attachment" and noticed that this was apparently fixed in the draft version, but it still appears in this 1st edition.

@janl

This comment has been minimized.

Show comment Hide comment
@janl

janl Feb 23, 2012

Owner

There is no space in the source, your browser should copy and paste this as a single line. What are you using?

Owner

janl commented Feb 23, 2012

There is no space in the source, your browser should copy and paste this as a single line. What are you using?

@janl janl closed this Feb 23, 2012

@therealplato

This comment has been minimized.

Show comment Hide comment
@therealplato

therealplato Feb 24, 2012

This happens in both Firefox 10.0.2 and Chrome 19.0.1041.0 dev-m on Windows 7. Screenshot: http://imgur.com/URwZA

When I highlight, copy, then paste the text into either vim or notepad++ it still has the extra space.

Why did you close this issue?

This happens in both Firefox 10.0.2 and Chrome 19.0.1041.0 dev-m on Windows 7. Screenshot: http://imgur.com/URwZA

When I highlight, copy, then paste the text into either vim or notepad++ it still has the extra space.

Why did you close this issue?

@janl

This comment has been minimized.

Show comment Hide comment
@janl

janl Feb 24, 2012

Owner

Ah thanks, can you try http://guide.couchdb.org/draft/api.html? It should include the fix.

Owner

janl commented Feb 24, 2012

Ah thanks, can you try http://guide.couchdb.org/draft/api.html? It should include the fix.

@therealplato

This comment has been minimized.

Show comment Hide comment
@therealplato

therealplato Feb 24, 2012

There was a space in the source, I submitted a pull request. Did I do it right? #461

There was a space in the source, I submitted a pull request. Did I do it right? #461

@janl

This comment has been minimized.

Show comment Hide comment
@janl

janl Feb 24, 2012

Owner

Yup, except that we treat editions/* as release tags and draft/ as master. I.e. development happens in draft and we don't alter editions/* after a release :)

Owner

janl commented Feb 24, 2012

Yup, except that we treat editions/* as release tags and draft/ as master. I.e. development happens in draft and we don't alter editions/* after a release :)

@therealplato

This comment has been minimized.

Show comment Hide comment
@therealplato

therealplato Feb 24, 2012

Looking at http://guide.couchdb.org/ from a user's POV the page design promotes "1st Edition" over "Draft." The 1st edition div are positioned above the Draft div. "Draft" is described as "work in progress" and offers to "help working on it." This immediately makes me think that Draft contents are probably still in flux, and if I want correct (if possibly dated) information I will click through to 1st edition.

I don't think I'm alone in this, I imagine nearly all readers click through to 1st edition from a similar train of thought.

If I understand you right, you're saying that no one will fix the typo in the 1st edition branch - the one everyone reads - because it's a policy to not modify this?

People were having this problem a year ago (#386), eight months ago, (#410) and now today. We'd obviously like to see it fixed.

If the editions/ branch is so sacrosanct, why not take a snapshot of draft/ and call it edition 1.1?

Looking at http://guide.couchdb.org/ from a user's POV the page design promotes "1st Edition" over "Draft." The 1st edition div are positioned above the Draft div. "Draft" is described as "work in progress" and offers to "help working on it." This immediately makes me think that Draft contents are probably still in flux, and if I want correct (if possibly dated) information I will click through to 1st edition.

I don't think I'm alone in this, I imagine nearly all readers click through to 1st edition from a similar train of thought.

If I understand you right, you're saying that no one will fix the typo in the 1st edition branch - the one everyone reads - because it's a policy to not modify this?

People were having this problem a year ago (#386), eight months ago, (#410) and now today. We'd obviously like to see it fixed.

If the editions/ branch is so sacrosanct, why not take a snapshot of draft/ and call it edition 1.1?

@janl

This comment has been minimized.

Show comment Hide comment
@janl

janl Feb 24, 2012

Owner

Yeah, these are all great points, I was pondering solutions for a while as well. Maybe @nslater has an idea?

Owner

janl commented Feb 24, 2012

Yeah, these are all great points, I was pondering solutions for a while as well. Maybe @nslater has an idea?

@nslater

This comment has been minimized.

Show comment Hide comment
@nslater

nslater Feb 24, 2012

Owner

I think we should accept this pull request. Sorry if I was unclear on IRC early Jan. I think of the 1st edition as being frozen in content. If we have markup bugs, we should definitely fix them. I also think that we should update the divs on the homepage.

Owner

nslater commented Feb 24, 2012

I think we should accept this pull request. Sorry if I was unclear on IRC early Jan. I think of the 1st edition as being frozen in content. If we have markup bugs, we should definitely fix them. I also think that we should update the divs on the homepage.

@nslater nslater reopened this Feb 24, 2012

@adambrault

This comment has been minimized.

Show comment Hide comment
@adambrault

adambrault Mar 3, 2012

Contributor

@therealplato @nslater I complete agree that the site appears to promote 1st Edition over the draft and that, if /draft is master, it should clearly be indicated as such and presented first.

I also came across a similar issue and fixed it here: adambrault/couchdb-guide@17ab83d -- pull request here: #462

I don't see value in keeping what are clear typographical errors in any promoted version.

Contributor

adambrault commented Mar 3, 2012

@therealplato @nslater I complete agree that the site appears to promote 1st Edition over the draft and that, if /draft is master, it should clearly be indicated as such and presented first.

I also came across a similar issue and fixed it here: adambrault/couchdb-guide@17ab83d -- pull request here: #462

I don't see value in keeping what are clear typographical errors in any promoted version.

@ThoughtCrhyme

This comment has been minimized.

Show comment Hide comment
@ThoughtCrhyme

ThoughtCrhyme Jun 8, 2012

I just ran into this trailing whitespace problem too. Still an issue for people using firefox.

I just ran into this trailing whitespace problem too. Still an issue for people using firefox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment