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

go.talks/pkg/present: slides file doesn't allow \r\n #5339

Closed
gopherbot opened this issue Apr 23, 2013 · 7 comments
Closed

go.talks/pkg/present: slides file doesn't allow \r\n #5339

gopherbot opened this issue Apr 23, 2013 · 7 comments

Comments

@gopherbot
Copy link
Contributor

by jackie.space:

What steps will reproduce the problem?
1. go get code.google.com/p/go.talks on windows
2. go get github.com/nf/go11
3. cd $GOPATH/src/github.com/nf/go11; present
4. Open web browser and visit http://127.0.0.1:3999/

What is the expected output?
not a error message

What do you see instead?
unexpected header line: "23 April 2013\r"

Please provide any additional information below.
I looked at the source code, seems here:
https://code.google.com/p/go/source/browse/pkg/present/parse.go?repo=talks#178
it only splits the lines on "\n".
Should we trim the "\r"? or just use strings.Trim? or read the lines properly,
e.g. use bufio.Scanner?
@adg
Copy link
Contributor

adg commented Apr 24, 2013

Comment 1:

It should use bufio.Scanner, once Go 1.1 is out.

Labels changed: added priority-later, removed priority-triage.

Owner changed to @adg.

Status changed to Accepted.

@robpike
Copy link
Contributor

robpike commented Jun 13, 2013

Comment 2:

Issue #5695 has been merged into this issue.

@adg
Copy link
Contributor

adg commented Jun 16, 2013

Comment 3:

my question is how the \r characters are getting there in the first place.

@alexbrainman
Copy link
Member

Comment 4:

Just a wild guess: http://mercurial.selenic.com/wiki/EolExtension. I believe, these
options can be set globally for all user's projects.
Another alternative, the files have been changed with an editor that does the conversion.
Alex

@gopherbot
Copy link
Contributor Author

Comment 5 by daz.fuller:

The .slide file I was using had been created from scratch using Notepad++. I did adjust
the settings to use Unix line endings but this didn't seem to make a difference
(possibly a bug in the text editor).
Darren

@adg
Copy link
Contributor

adg commented Jun 24, 2013

Comment 6:

https://golang.org/cl/10483043

Status changed to Started.

@adg
Copy link
Contributor

adg commented Jun 24, 2013

Comment 7:

This issue was closed by revision golang/talks@9424ebc.

Status changed to Fixed.

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

No branches or pull requests

4 participants