UcasRichard / snakeyaml

Automatically exported from code.google.com/p/snakeyaml
Apache License 2.0
0 stars 0 forks source link

Allow separate option in DumperOptions for long strings (feature request) #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be nice to have separate options for defaultScalarStyle and perhaps 
longStringStyle.

This way a document can look a bit nicer upon dumping:

normal: uses plain style
long: >-
  defaults to a different style because
  this string is longer than the width
  set in the DumperOptions

Original issue reported on code.google.com by grignaak@gmail.com on 10 Nov 2009 at 7:06

GoogleCodeExporter commented 9 years ago
I will try to address this request together with other issues with pretty-print 
dumping.
If you have a proposal for the implementation or an API change - feel free to 
contribute.

Original comment by py4fun@gmail.com on 10 Nov 2009 at 10:38

GoogleCodeExporter commented 9 years ago
Can you please see the proposal in the clone (http://code.google.com/r/py4fun-
issue29/source/clones) ?
Please check FlexibleScalarStyleTest.

DumperOptions gets the method chooseScalarStyle() where you can redefine the 
default 
scalar style.

Original comment by py4fun@gmail.com on 16 Nov 2009 at 5:42

GoogleCodeExporter commented 9 years ago
merged from clone

Original comment by py4fun@gmail.com on 2 Dec 2009 at 11:15

GoogleCodeExporter commented 9 years ago
DumperOptions.chooseScalarStyle() is deprecated as of version 1.10

It should be redundant now because of the fix for issue 66

Original comment by py4fun@gmail.com on 10 Oct 2011 at 3:53