liangzimei / yamlmatlab

Automatically exported from code.google.com/p/yamlmatlab

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple formatting problems under Windows

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?
1. In Matlab I did the following:

a.test = magic(4)
WriteYaml('test.yml',a)

What is the expected output? What do you see instead?

The valid YAML output should be in test.yml:

%YAML 1.3
test:
  - [16.0, 2.0, 3.0, 13.0]
  - [5.0, 11.0, 10.0, 8.0]
  - [9.0, 7.0, 6.0, 12.0]
  - [4.0, 14.0, 15.0, 1.0]

Rather, the script does not use windows return carriages on Window, and fails 
to indent each line correctly:

test:- [16.0, 2.0, 3.0, 13.0]- [5.0, 11.0, 10.0, 8.0]- [9.0, 7.0, 6.0, 12.0]- 
[4.0, 14.0, 15.0, 1.0]

Even after replacing the UNIX return characters with the Windows version, the 
indentation is incorrect:

test:
- [16.0, 2.0, 3.0, 13.0]
- [5.0, 11.0, 10.0, 8.0]
- [9.0, 7.0, 6.0, 12.0]
- [4.0, 14.0, 15.0, 1.0]

Also, some programs, such as OpenCV expect the file to be identified with a 
%YAML: <version> tag at the top of the file. yamlmatlab doesn't do this.

What version of the product are you using? On what operating system?

0.3.2, Windows 7 x64

Please provide any additional information below.

Original issue reported on code.google.com by matthew....@gmail.com on 21 Aug 2011 at 2:28

Formatting problems fixed in version 0.4.0,

String defining the YAML version (%YAML 1.3) is not read because java library 
which is used to read yaml structure does not provide functionality to do 
that.. So, please, ask the developers of snakeyaml to implement this feature, 
then it will work here.

Original comment by JirkaCig...@gmail.com on 9 Sep 2011 at 7:34

  • Changed state: Fixed