Shoutbox

Strikethrough text and quotes - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: General (/forumdisplay.php?fid=11)
+---- Forum: Forum & Website (/forumdisplay.php?fid=13)
+----- Thread: Strikethrough text and quotes (/showthread.php?tid=87720)

Strikethrough text and quotes by Mike on 12-13-2008 at 09:43 AM

Text after this quote won't be strikethroughed:

quote:
test

Text after this quote will be strikethroughed:

quote:
test2

This should be strikethroughed.



In reality, all text should have been strikethrouged.

Firefox bug maybe? :P
RE: Strikethrough text and quotes by Volv on 12-13-2008 at 09:46 AM

Everything is has a strikethrough except for the very last 2 lines here i.e. working fine here (Opera).

EDIT: Just tried it on firefox and the 2 quotes + the line in between the 2 quotes do not have strikethroughs.


RE: Strikethrough text and quotes by Th3rmal on 12-13-2008 at 02:53 PM

quote:
Originally posted by Volv
Just tried it on firefox and the 2 quotes + the line in between the 2 quotes do not have strikethroughs.


RE: Strikethrough text and quotes by NanaFreak on 12-13-2008 at 02:54 PM

yea, fail much? =\


RE: Strikethrough text and quotes by MeEtc on 12-13-2008 at 05:51 PM

quote:
Originally posted by validator.w3.org
Line 103, Column 11: document type does not allow element "blockquote" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.

Line 106, Column 11: document type does not allow element "blockquote" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.

Blame the dodgy post parser. Again.
RE: Strikethrough text and quotes by WDZ on 12-13-2008 at 07:30 PM

Why should the parser be expected to fix mistakes like that? It's possible to produce invalid HTML with just about any BBCode parser that doesn't use a state machine or some other complicated and slow solution like that.

Kinda related thread: http://community.mybboard.net/archive/index.php/thread-12241.html

You can easily fix the problem by fixing your BBcode. :p

blah 1

quote:
test
blah 2
quote:
test2
blah 3

(The styling of quote: is technically not supported =p)
RE: Strikethrough text and quotes by TheBlasphemer on 12-18-2008 at 01:13 PM

quote:
Originally posted by WDZ
Why should the parser be expected to fix mistakes like that? It's possible to produce invalid HTML with just about any BBCode parser that doesn't use a state machine or some other complicated and slow solution like that.
What? calling a state-machine slower than a string replace :p? With string replacing, you're already looping through the string several times, why would doing it once but slightly different be any slower?
Actually, with algorithms like Aho-Corasick, you could probably suffice with looping through it just once and doing all the BBCode replaces properly with a stack and all.

The fact that implementing a state machine in PHP is slower than using the built-in regexp or string replacing functions doesn't mean it's slower by definition ;)

In theory (and probably also in practice, if you'd write a PHP module for it) a state machine would probably be one of the fastest and most elegant way to implement BBCode parsing :p

(Sorry mate, just couldn't resist ;))
RE: Strikethrough text and quotes by WDZ on 12-19-2008 at 06:25 AM

quote:
Originally posted by TheBlasphemer
The fact that implementing a state machine in PHP is slower than using the built-in regexp or string replacing functions doesn't mean it's slower by definition ;)
Right, sorry for not making that clear... a PHP implementation is what I had in mind, as this forum software is written in PHP. :p

There is a BBCode parsing extension available, but I can't find a single application that uses it, and who wants to compile and install an extension and add another dependency to their software just to parse some BBCode? =p