Преглед изворни кода

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

Songmu пре 11 година
родитељ
комит
c1cd2254a6
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      emitterc.go

+ 1 - 1
emitterc.go

@@ -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 {