[TxMt] Blogging Bundle: Excerpts for Wordpress

Brett Terpstra brett at circlesixdesign.com
Sat Nov 4 11:37:42 UTC 2006


What I was getting at was not that I thought you would require the  
exact RFC 822 syntax, but that you would need a specific syntax in  
general, and it would be hard to guarantee that the user would follow  
that syntax and not screw things up before parsing.  The <<EXCERPT  
idea is more along the lines of what I was thinking, and a snippet  
could insert the necessary code.  Couldn't you just have the header  
start with a word and a colon, and then the excerpt be terminated by  
something like ENDEXCERPT?

Do you want to preserve the CR?  Do they need to be escaped before  
posting, or are they stripped in parsing?

On Nov 4, 2006, at 5:15 AM, Allan Odgaard wrote:

> On 4. Nov 2006, at 10:38, Brett Terpstra wrote:
>
>> If I understand RFC 822 correctly, multi-line headers require  
>> specific syntax (CRLF followed by a single LWSP and terminated by  
>> a CR).  I'll leave the details up to you, and I'm probably  
>> overlooking something simple, I just don't quite grasp how you're  
>> going to make it simple for the average blogger to add an excerpt  
>> which can be easily parsed as separate from the message body if  
>> there's nothing to terminate it.  I'm just curious.
>
> We wouldn’t follow it strictly, just the idea, so e.g. drop  
> everything about CR.
>
> It boils down to: a header starts with a word, then a colon. If the  
> next line has indent, that indent is removed, and the header  
> continues at that line.
>
> So a simple post:
>
>     Title: foo
>     Excerpt: Lorem ipsum dolor sit amet,
>         consectetur adipisicing elit, sed
>         do eiusmod tempor incididunt ut
>         labore et dolore magna aliqua.
>
>     And here is the actual body.
>
> Or said another way, the header stops with the first non-indented  
> and non-empty line.
>
> A problem though is that we wouldn’t be able to support Markdown  
> for the excerpt, at least not code blocks and hard wrapped list items.
>
> Maybe we should go for the here-doc syntax. So it would be:
>
>     Title: foo
>     Excerpt: <<EXCERPT
>     Lorem ipsum dolor sit amet,
>     consectetur adipisicing elit, sed
>     do eiusmod tempor incididunt ut
>     labore et dolore magna aliqua.
>     EXCERPT
>
>     And here is the actual body.
>
> But then the question is if there should be a way to escape the <<  
> used to provide a token. Though probably just better to not allow  
> arbitrary tokens, so the chance of a false positive is highly  
> unlikely.
>
>
>
>
>
>
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate

Brett Terpstra : Art Director
Circle Six Design, Inc.
111 Riverfront Dr, Suite 204
..................................................
p: 507.459.4398
     877.858.4332
f: 1.866.540.3063
e: brett at circlesixdesign.com
http://www.circlesixdesign.com
..................................................





More information about the textmate mailing list