Re: [markdown-testsuite] Add End Of Line (EOL) definition/tests. (#1)

* Dave Pawson <dave.pawson@gmail.com> [2012-11-28 09:32 -0500]:
> On 28 November 2012 14:05, David J. Weller-Fahy <dave-lists-public-markdown@weller-fahy.com> wrote:
> +1 on confusion. I was using \n as a generic line terminator.
> As defined in the glossary http://www.w3.org/community/markdown/wiki/Glossary

Heh, yeah... I think that means I need to start reviewing the wiki more.
;)

> > By defining EOL as I have, we have something to replace the use of
> > \n within block terminations, but which applies to almost all end of
> > line standards in use today.
> 
> I'm cautious about using specific code points since I don't know what
> is used on all operating systems. For me 'almost all' seems to fall
> short?

It does, but 'almost all' was used by me as an automatic protective
qualifier: There are (AFAIK) only three standard end of line sequences
in use today, and I covered them.  There are other sequences which could
be used as the end of the line (form feed, for example), and which would
mean the line had ended, but I do not know of anyone using them in the
regular generation of text.

> > By the way, I am in no way committed to the particular name used, we
> > can call it something other than "EOL" if you'd prefer, but we
> > should not use standard representations of single characters (\n) to
> > represent a generic OS agnostic sequence (the end of a line).
> >
> > Does that make more sense?
> 
> Yes, though is it perhaps your history with \n?
> E.g. regexen uses \n quite happily on two or three OS's?
> I used it since I had no association with other than an OS agnostic
> definition.

Ah!  Here are some references showing where I get my background with it:

http://docs.python.org/2/reference/lexical_analysis.html#string-literals
http://msdn.microsoft.com/en-us/library/h21280bw%28v=vs.80%29.aspx

Also, checking the man page for pcrepattern, there is a distinction made
between \n and \r (line feed and carriage return, respectively), so your
experience with \n may be specific to the implementation you used.

> \n as a symbol, defined in the glossary is shorter than EOL or eoln
> ....

It is shorter, but we could pick something not so loaded with previous
meaning.

Regards,
-- 
dave [ please don't CC me ]

Received on Wednesday, 28 November 2012 15:34:23 UTC