Hi Sven,
On 08/28/2014 04:47 PM, Sven Van Caekenberghe wrote:
Hi,
On 28 Aug 2014, at 07:49, Offray Vladimir Luna Cárdenas <off...@riseup.net>
wrote:
The last question its related with Sven's STON: Suppose that I would like to
store light markup languages in STON which have the single quote character (')
on them, without creating any escape sequence, is this possible on STON and if
not, what is needed to be changed for that?
I am not sure I understand, but I assume you want to be able to write another
language inside a String constant. STON uses the same escape sequences as JSON. So
that means you have to use either the general \uFFFF or a couple of shortcuts, like
\' and \". Note however that you can use both single and double quote as string
delimiters.
So you do:
'x:="foo"' or "x:='foo'" as well as 'x:=\'foo\'' and "x:=\"foo\""
Does that help ?
Sven
Yes I imagine myself writing long structured documents in light markup
languages (specifically pandoc's markdown [1]) in my outliner and
storing it in STON. Because single and double quotes are fairly common
in writing I would like to write my documents with out worrying about
escape characters or the sequence of single quotes and double ones.
Being STON a young language would be nice to provide a way inside it to
store arbitrary long sequences of text that can contain single and
double quotes.
YAML[2] (another nice serializing language) has solved the issue with
indentation blocks and some minor marks which help a lot to human
readability (similar to the pretty printing of STON) and python has
their triple quotes which are pretty uncommon on casual writing. Both of
the has proven to me being very useful ways to store light markup
language inside yaml or python and I would like to know if there is a
similar option for STON or if this can be easily implemented.
[1] http://johnmacfarlane.net/pandoc/
[2] https://en.wikipedia.org/wiki/YAML
Thanks,
Offray