* John Gruber <[EMAIL PROTECTED]> [2006-10-19 06:35]:
> I'd rather have line prefixes. I know they're harder to
> generate in textarea fields, because you have to do them by
> hand, but I'm finding it harder and harder to care about the
> plight of the textarea-field-writer.
> 
>     ~   function db_like($first, $pattern) {
>     ~       $pattern = preg_quote($pattern);
>     ~       $pattern = preg_replace('/(?<!\\)_/', '.', $pattern);
>     ~       $pattern = preg_replace('/(?<!\\)%/', '.*?', $pattern);
>     ~       return preg_match('{^'.$pattern.'$}', $first);
>     ~   }

I find those æsthetically highly offensive.

I would suggest pipes, which I’ve seen used in the wild, although
I guess those might clash with a potential future table markup.

Other options with some precedent include hash marks and percent
signs; both are markers for single-line comments in some
languages, so code blocks prefixed with them is not an uncommon
sight. Of those I’d favour the percent sign, because while it has
much less precedent, the hash mark looks very heavy.


* Eric Daspet <[EMAIL PROTECTED]> [2006-10-19 17:20]:
> Both solutions have a *major* problem : you can't copy/paste
> code. You have to add/delete these ~ on each line.

Do note that that argument breaks down as soon as you consider
code blocks nested inside any other construct, which necessitates
indentation; granted, of course, that it is an uncommon use case.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>
_______________________________________________
Markdown-Discuss mailing list
[email protected]
http://six.pairlist.net/mailman/listinfo/markdown-discuss

Reply via email to