James Britt wrote:
I don't see the appeal of embedding HTML or Textile inside of YAML. You
seem to get the worst of both worlds.
Personal taste, perhaps.
Definitely there are minor annoyances that I'll be smoothing out over the next little while. The largest of these (folding of lines) will be finessed with the upcoming RedCloth 3. Hopefully, we can keep working toward something even better than the current setup.
I feel YAML + Textile is ideal for writing a book. (However, I haven't taken a book to the printer's yet, so I have yet to confront that reality.)
YAML serves three purposes in my doc format:
1. metadata regarding the text (allow licensing info and
2. to provide hierarachy for chapters and sections (specifically for
generating the table of contents)
3. custom content (sidebars, tip boxes)
Textile blocks reside in the book sections, comprising the bulk of the book's text. I prefer Textile to other simple markups, because it allows assignment of CSS IDs and classes to elements.
For example, if I have a paragraph I'd like to hilite:
p(hilite). Despite the surge of power you feel upon learning Ruby,
resist the urge to trip others or slap them in the bald head.
DO NOT LORD YOUR RUBYNESS OVER OTHERS!
The goal is to allow hooks into the CSS class with RedCloth, so that
the PDF generator can format those paragraphs, if desired.
The indentation complaint is reasonable. I guess it's a toss up between continual indentation and XML's start and end tags.
Embedding Textile in XML seems like a disaster, since I'd have to ensure that entities are encoded and such. YAML is worryfree, since I can embed anything as long as it's indented.
All in all, the combination has made all kinds of writing very smooth.
_why