Re: Don't understand folded text entries.

Sam Vilain <sam-s9IUA/[email protected]>
Newsgroups gmane.text.yaml.general
Message-ID <[email protected]>
Kenneth Downs wrote:
> Hi folks, I'm using YAML to do database specifications, so they look 
> something like this:
>
> column price:
>    type_id: numb
>    colprec: 5
> ....and so forth
>
> pretty simple stuff.  What I don't understand from the docs is how to 
> put in free-form notes that may include wiki formatting and other 
> stuff.  I think in YAML-speak I want a "folding" block.  Would this work:
>
> column price:
>   type_id: numb
>   notes: "The price column
> is required so we know how much something costs.
>
> I can skip a line in here and i'm ok.  In fact I can use
> a [[wikilink]] if I want to."
>
> Is that the basic idea?  Just use quotes and I'm good?

I normally use the "|" form;

  column price:
    type_id: numb
    notes: |
      The price column is required so we know how much something costs.

      I can skip a line in here and i'm ok.  In fact I can use
      a [[wikilink]] if I want to.


You'll still end up with linefeeds in the output, but all the whitespace
to the left of the block has been stripped. I think there are other
useful ways of starting it than "|" that work differently, too.

Sam.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.