jhinkey/liferay-portal — pull request #41 by codyhoag (2013-07-30 21:05:07+00:00)
Title: LPS-33744: Preserve formatting of Javadoc tables with nested <pre> tags

Hi Jim,

I put together a fix for the issues we were having with the `

` tag being removed when it possessed nested `

` tags. When running `String[] cdataParts = cdata.split(startTag);` it isn't grabbing the entire `

..

` content. This is because the `

` tag formatting is done first. When the arrays are split into `cdataParts`, the first array has the `

` tag inside without the ending `

` (due to the split happening at the first `

` tag). Therefore, when we run:

`if (cdataPart.contains("")) {
sb.append(startTag);`

to append the start `

` tag back to the top (due to its removal during formatting), it is skipped because `

` is not present. Therefore, `

` is torn out of *AnnotationLocatorTest* completely.

The fix skips formatting the `

` tag content when the `exclude` variable is set to *pre*. We should focus on the `

` tag content only when `exclude` is set to *table*.

We can discuss more tomorrow, if need be.

http://issues.liferay.com/browse/LPS-33744