| Description: |
Hello!
I found if I put code with indentation in a huddle string object, when I call huddle2yaml, the code indentation is lost. For example:
```
package require yaml
package require huddle
set huddleString [huddle string {proc find {{basedir .} {filterScript {}}} {
set oldwd [pwd]
cd $basedir
set cwd [pwd]
set filenames [glob -nocomplain * .*]
set files {}
set filt [string length $filterScript]
foreach filename $filenames {
if {!$filt || [eval $filterScript [list $filename]]} {
lappend files [file join $cwd $filename]
}
if {[file isdirectory $filename]} {
set files [concat $files [find $filename $filterScript]]
}
}
cd $oldwd
return $files
}
}]
puts [::yaml::huddle2yaml $huddleString 4 40]
```
It returns:
```
---
|
proc find {{basedir .} {filterScript {}}} {
set oldwd [pwd]
cd $basedir
set cwd [pwd]
set filenames [glob -nocomplain * .*]
set files {}
set filt [string length $filterScript]
foreach filename $filenames {
if {!$filt || [eval $filterScript [list $filename]]} {
lappend files [file join $cwd $filename]
}
if {[file isdirectory $filename]} {
set files [concat $files [find $filename $filterScript]]
}
}
cd $oldwd
return $files
}
```
Thank you in advance!
|