learnedax ([personal profile] learnedax) wrote2005-04-04 01:16 pm

Auto cut-tagging achieved

Well, that was easy. I've been fiddling a bit with making my friends view block quizlets, which involves a bunch of string parsing that the LJ style language does not already include, and [livejournal.com profile] laurion commented that it would be handy to chop entries over a certain length. I realized that I could do that by adding two lines to the basic layout, so now my friends page auto-cuts after 1000 characters. (That number is actually rather smaller than I want for regular use, but works well for demonstration purposes.)

Take that, overlong uncut entries.

[identity profile] dglenn.livejournal.com 2005-04-04 08:54 pm (UTC)(link)
FYI: Small glitchitude if the cutoff happens in the middle of an HTML tag (at least within an HREF). Take a look at houw my most recent entry appears on your friends page -- the auto-cut message is missing.

[identity profile] learnedax.livejournal.com 2005-04-04 09:01 pm (UTC)(link)
Yeah, I haven't found a useful way around that. Without parsing for context, the message will appear in whatever html context it interrupts, which could be confusing.