So how about an XML-like mark-up language but instead of <tag>s we use meaningful whitespace? Human-readable, easy as pie to parse and looks beautiful.
Name:
Anonymous2011-08-30 9:27
Something like this? bbcode
One word:
b
u
i
o
THE FORCED INDENTATION OF TEXT!
br
Thread over!
So what about text content that spans more than a line? Gonna parse it all and insert ``meaningful whitespace'' at the right positions? But then how do you get it back to the original format once you're trying to parse the file back in?
In a YAML character stream, structure is often determined from indentation, where indentation is defined as a line break character (or the start of the stream) followed by zero or more space characters. Note that indentation must not contain any tab characters. The amount of indentation is a presentation detail used exclusively to delineate structure and is otherwise ignored. In particular, indentation characters must never be considered part of a node's content information.
:library
:book title="SICP"
:chapter title="Building Abstractions with Procedures"
:page
We are about to study the idea of a computational process. Computational processes are abstract beings that inhabit computers. As they evolve, processes manipulate other abstract things called data.
The evolution of a process is directed by a pattern of rules called a program.
People create programs to direct processes. In effect, we conjure the spirits of the computer with our spells.
:page
Whitespace, linebreaks, etc. don't matter.
:page >>>
:maybe there could be a heredoc syntax to turn off the parser.
<<<
of course the problem is that there is no distinction between tag and content. so you'd want some kind of delimiter.