Conversation
Notices
-
@minti Markdown's nice. I'd prefer reStructured Text personally just because I have to use it more.
Sunday, 13-May-12 18:53:21 UTC from web-
@toksyuryel I'll look into that too. Thanks for pointing it out. :p
-
@minti For basic formatting it's nearly identical to Markdown; both rely on whitespace for most of their other features, which on this particular site is stripped out of posts entirely, so really whichever you choose is largely a matter of what you want to call it as opposed to what you're supporting. There are a couple edge cases though.
-
@toksyuryel Ooh. Well I was just going to add support for stuff like *emphasis*, **bolding**, `code blocks` and such. xD
-
@minti Yeah those are identical between Markdown and reST. But links that aren't simply raw urls have a different syntax.
-
@toksyuryel @minti Just don't pick Textile, whatever you do. There's some nasty surprises in its syntax that, for example, make it impossible, given the behaviour of the reference parser at least, to type == (because that's the "display this text raw" code, but it accepts both "==RAW TEXT" or the block-based "==RAW TEXT== FORMATTED TEXT"-style syntax, making an attempt to type raw == by using ==== look identical to an empty block-based one).
-
@bitshift Haha. After seeing all these I may just roll my own. Assuming it's even worth it at all considering I'd still have to parse bbcode to stay compatible with RDNRefresh..
-
@minti I've been needing a little JS project, I should see how easily I can whip up a BBcode parser. Plus, I kinda want to see how painful it would get if I tried to make my own modular refresh-only and format-only scripts. :P
-
@bitshift BBCode parsing is easy as heck. I wrote my own tokenizer and parser when I was like 12. XD (Everyone yelled at me and said I should have used Regex, which is 100% true. I love regex. >_>)
-
@minti >you have a problem >you use a regex >you have 2 problems
Toksyuryel likes this. -
@minti (I am, of course, being facetious. I also have a fetish for solving things with regexes where possible.)
-
@minti The only reason I'm partial to reST is because it's the standard for Python documentation so I need to practice using it more. I'd probably prefer Markdown if not for that.
-
@bitshift /highfive
-
@bitshift Just make sure they're actually faster than solving it without them, and that you write them in a way that makes them maintainable. Python actually provides a nice facility for doing this.
-
@toksyuryel re.compile("(?:ht|f)tp[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+") is the most beautiful thing.
-
@bitshift rdnrefresh totally mangled that, ha XD
-
@toksyuryel !mintrefresh didn't. :P
-
@bitshift I find it sad that such a regex would explode in my script most likely xD Tempted to try it anyway.
-
@toksyuryel Yeah RDNRefresh parses the start and end tags as two separate regexes..
-
@bitshift I really should switch to that until Firefox 13 is properly released.
-
@minti I'm not quite sure what purpose it would solve in !mintrefresh, given it matches valid URLs, and the posts returned by SN already have a neatly tokenized (including URLs as links) version in the form of the HTML output.
-
@bitshift Well in order to not have this hacky iteneration over the entire dom tree of each notice trying to figure out which one should be spoilerized or not I basically decided to reparse the entire notice from scratch myself, then cache the spoilered and non spoilered one. Still not sure if it's a good idea but, it's ran into a few bumps so I may just discard this edit. xD
-
@toksyuryel Markdown is nice, but has some glaring issues (mostly with nested lists/separate sequential lists), at least in an old version of the standard parser and the most common Python port thereof. I believe reddit's (Python) implementation sidesteps said problems, and is open source, though.
-
@bitshift I actually got the initial idea from Reddit. xD
-
@minti Oh, okay. Then yeah, it'd be neat to have IdentiCurse (that's where I grabbed that line from, though I've also used it elsewhere since) and !mintrefresh agree on what constitutes a link. :)
-
@bitshift Problem with mine is that it tries to parse links even if they don't have the http:// prefix, which StatusNet does correctly. xD
-
@minti Eh, StatusNet goes.too.far the other way and identifies.too.many.things.as.links, in my opinion.
-
@bitshift everything.is.a.link
-
@bitshift It is my opinion that links should never be detected without an explicit http:// or https://
Bit Shift likes this. -
@bitshift http://i.imgur.com/R5LVS.png And this is what my script does. XD
-
@toksyuryel Yeah that's on my list of "OH GOD FIX IT FIX IT FIX IT FIX IT FIX IT" bigs. http://ur1.ca/98fjo
-