Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4187)

Issue 26430043: goyaml: fix printing of bare hyphens

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years ago by dave
Modified:
11 years ago
Reviewers:
mp+195162, jameinel, wallyworld, rog
Visibility:
Public.

Description

goyaml: fix printing of bare hyphens https://code.launchpad.net/~dave-cheney/goyaml/goyaml/+merge/195162 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -1 line) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M decode_test.go View 1 chunk +1 line, -0 lines 0 comments Download
M emitterc.go View 1 chunk +1 line, -1 line 1 comment Download
M encode_test.go View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 5
dave_cheney.net
Please take a look.
11 years ago (2013-11-14 02:40:37 UTC) #1
wallyworld
LGTM
11 years ago (2013-11-14 02:53:02 UTC) #2
jameinel
LGTM, is there a bug to associate with this ? (goyaml panics when encountering a ...
11 years ago (2013-11-14 05:36:39 UTC) #3
jameinel
*** Submitted: goyaml: fix printing of bare hyphens related to bug #1227952. Quote a bare ...
11 years ago (2013-11-14 05:43:32 UTC) #4
rog
11 years ago (2013-11-14 09:59:20 UTC) #5
https://codereview.appspot.com/26430043/diff/1/emitterc.go
File emitterc.go (right):

https://codereview.appspot.com/26430043/diff/1/emitterc.go#newcode1015
emitterc.go:1015: if len(value) == 3 && ((value[0] == '-' && value[1] == '-' &&
value[2] == '-') || (value[0] == '.' && value[1] == '.' && value[2] == '.')) {
Are we sure this preserves the same semantics as before?
If the idea is just to avoid the panic, I'd have used ">= 3"
rather than "== 3".
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b