فهرست منبع

Revert semantic change in previous revision.

Gustavo Niemeyer 12 سال پیش
والد
کامیت
2628b30e54
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      emitterc.go

+ 1 - 1
emitterc.go

@@ -1012,7 +1012,7 @@ func yaml_emitter_analyze_scalar(emitter *yaml_emitter_t, value []byte) bool {
 		return true
 		return true
 	}
 	}
 
 
-	if len(value) == 3 && ((value[0] == '-' && value[1] == '-' && value[2] == '-') || (value[0] == '.' && value[1] == '.' && value[2] == '.')) {
+	if len(value) >= 3 && ((value[0] == '-' && value[1] == '-' && value[2] == '-') || (value[0] == '.' && value[1] == '.' && value[2] == '.')) {
 		block_indicators = true
 		block_indicators = true
 		flow_indicators = true
 		flow_indicators = true
 	}
 	}