Index: trunk/phase3/tests/parser/parserTests.txt |
— | — | @@ -8973,97 +8973,6 @@ |
8974 | 8974 | </p> |
8975 | 8975 | !! end |
8976 | 8976 | |
8977 | | -!! test |
8978 | | -Bug 31865: HTML-style tag <dws> is recognized and discarded. |
8979 | | -!! input |
8980 | | -one<dws>two |
8981 | | -!! result |
8982 | | -<p>onetwo |
8983 | | -</p> |
8984 | | -!! end |
8985 | | - |
8986 | | -!! test |
8987 | | -Bug 31865: XML-style tag <dws/> is recognized and discarded. |
8988 | | -!! input |
8989 | | -one<dws/>two |
8990 | | -!! result |
8991 | | -<p>onetwo |
8992 | | -</p> |
8993 | | -!! end |
8994 | | - |
8995 | | -!! test |
8996 | | -Bug 31865: Spaces after <dws> tag are discarded. |
8997 | | -!! input |
8998 | | -one<dws> two |
8999 | | -!! result |
9000 | | -<p>onetwo |
9001 | | -</p> |
9002 | | -!! end |
9003 | | - |
9004 | | -!! test |
9005 | | -Bug 31865: Tabs after <dws> tag are discarded too. |
9006 | | -!! input |
9007 | | -one<dws> two |
9008 | | -!! result |
9009 | | -<p>onetwo |
9010 | | -</p> |
9011 | | -!! end |
9012 | | - |
9013 | | -!! test |
9014 | | -Bug 31865: Newlines after <dws> tag are discarded too. |
9015 | | -!! input |
9016 | | -one<dws> |
9017 | | - |
9018 | | - |
9019 | | -two |
9020 | | -!! result |
9021 | | -<p>onetwo |
9022 | | -</p> |
9023 | | -!! end |
9024 | | - |
9025 | | -!! test |
9026 | | -Bug 31865: Spaces before <dws> tag are not discarded. |
9027 | | -!! input |
9028 | | -one <dws>two |
9029 | | -!! result |
9030 | | -<p>one two |
9031 | | -</p> |
9032 | | -!! end |
9033 | | - |
9034 | | -!! test |
9035 | | -Bug 31865: <dws> Continuation is indented. |
9036 | | -!! input |
9037 | | -one<dws> |
9038 | | - two |
9039 | | -!! result |
9040 | | -<p>onetwo |
9041 | | -</p> |
9042 | | -!! end |
9043 | | - |
9044 | | -!! test |
9045 | | -Bug 31865: <dws> List item continuation. |
9046 | | -!! input |
9047 | | -* one<dws> |
9048 | | - two |
9049 | | -* three |
9050 | | -!! result |
9051 | | -<ul><li> onetwo |
9052 | | -</li><li> three |
9053 | | -</li></ul> |
9054 | | - |
9055 | | -!! end |
9056 | | - |
9057 | | -!! test |
9058 | | -Bug 31865: <dws/> XML-style; asterisk after the tag does not start list item. |
9059 | | -!! input |
9060 | | -* one <dws/> |
9061 | | -* two |
9062 | | -!! result |
9063 | | -<ul><li> one * two |
9064 | | -</li></ul> |
9065 | | - |
9066 | | -!! end |
9067 | | - |
9068 | 8977 | TODO: |
9069 | 8978 | more images |
9070 | 8979 | more tables |
Index: trunk/phase3/includes/parser/Preprocessor_Hash.php |
— | — | @@ -153,9 +153,6 @@ |
154 | 154 | $ignoredElements = array( 'includeonly' ); |
155 | 155 | $xmlishElements[] = 'includeonly'; |
156 | 156 | } |
157 | | - // `dws' stands for "discard white spaces". `<dws>' and all the whitespaces afer it are |
158 | | - // discarded. |
159 | | - $xmlishElements[] = 'dws'; |
160 | 157 | $xmlishRegex = implode( '|', array_merge( $xmlishElements, $ignoredTags ) ); |
161 | 158 | |
162 | 159 | // Use "A" modifier (anchored) instead of "^", because ^ doesn't work with an offset |
— | — | @@ -353,17 +350,6 @@ |
354 | 351 | } |
355 | 352 | |
356 | 353 | $tagStartPos = $i; |
357 | | - |
358 | | - // Handle tag dws. |
359 | | - if ( $name == 'dws' ) { |
360 | | - $i = $tagEndPos + 1; |
361 | | - if ( preg_match( '/\s*/', $text, $matches, 0, $i ) ) { |
362 | | - $i += strlen( $matches[0] ); |
363 | | - } |
364 | | - $accum->addNodeWithText( 'ignore', substr( $text, $tagStartPos, $i - $tagStartPos ) ); |
365 | | - continue; |
366 | | - } |
367 | | - |
368 | 354 | if ( $text[$tagEndPos-1] == '/' ) { |
369 | 355 | // Short end tag |
370 | 356 | $attrEnd = $tagEndPos - 1; |
Index: trunk/phase3/includes/parser/Preprocessor_DOM.php |
— | — | @@ -211,9 +211,6 @@ |
212 | 212 | $ignoredElements = array( 'includeonly' ); |
213 | 213 | $xmlishElements[] = 'includeonly'; |
214 | 214 | } |
215 | | - // `dws' stands for "discard white spaces". `<dws>' and all the whitespaces afer it are |
216 | | - // discarded. |
217 | | - $xmlishElements[] = 'dws'; |
218 | 215 | $xmlishRegex = implode( '|', array_merge( $xmlishElements, $ignoredTags ) ); |
219 | 216 | |
220 | 217 | // Use "A" modifier (anchored) instead of "^", because ^ doesn't work with an offset |
— | — | @@ -409,20 +406,6 @@ |
410 | 407 | } |
411 | 408 | |
412 | 409 | $tagStartPos = $i; |
413 | | - |
414 | | - // Handle tag `dws'. |
415 | | - if ( $name == 'dws' ) { |
416 | | - $i = $tagEndPos + 1; |
417 | | - if ( preg_match( '/\s*/', $text, $matches, 0, $i ) ) { |
418 | | - $i += strlen( $matches[0] ); |
419 | | - } |
420 | | - $accum .= |
421 | | - '<ignore>' . |
422 | | - htmlspecialchars( substr( $text, $tagStartPos, $i - $tagStartPos ) ) . |
423 | | - '</ignore>'; |
424 | | - continue; |
425 | | - } |
426 | | - |
427 | 410 | if ( $text[$tagEndPos-1] == '/' ) { |
428 | 411 | $attrEnd = $tagEndPos - 1; |
429 | 412 | $inner = null; |