[ create a new paste ] login | about

Link: http://codepad.org/PGSn8vuG    [ raw code | output | fork ]

C, pasted on Jul 12:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Great class, it really works very well. However I would argue some of your logic.

Example:
<em><p>here we go!</p><p>One more line</p></em>

Your class will kill the em as your logic denies em outside a P, resulting in this code:

<p>here we go!</p><p>One more line</p>

However, given the fact that code might come from eg. TinyMVE or another WYSIWYG my example is a valid one and should produce the following code if fixed at all:

<p><em>here we go!</em></p><p><em>One more line</em></p>

Killing the <em> doesnt really fix anything, it accually destroys the presentation of the page.

However, easy to prevent in your code however by just modifying the array for the p check. As I do not have had time to let your class sink into my brain yet, I havnt come up with my fix just disabled the fix. If I do, I will surely post it here!


Output:
1
Line 1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'class'


Create a new paste based on this one


Comments: