Permalink
Browse files

fix bug: width() always returns width of first character!

  • Loading branch information...
1 parent 43a0256 commit c1cd2254a6dd314c9d73c338c12688c9325d85c6 @Songmu Songmu committed May 19, 2015
Showing with 1 addition and 1 deletion.
  1. +1 −1 emitterc.go
View
@@ -1019,7 +1019,7 @@ func yaml_emitter_analyze_scalar(emitter *yaml_emitter_t, value []byte) bool {
preceeded_by_whitespace = true
for i, w := 0, 0; i < len(value); i += w {
- w = width(value[0])
+ w = width(value[i])
followed_by_whitespace = i+w >= len(value) || is_blank(value, i+w)
if i == 0 {

0 comments on commit c1cd225

Please sign in to comment.