Lines 187-193
Link Here
|
187 |
if (lastText.depth == htmlDepth || // found same html tag level => use it |
187 |
if (lastText.depth == htmlDepth || // found same html tag level => use it |
188 |
lastText.htmlNodesPtr == -1) { // no more sub-levels => add one |
188 |
lastText.htmlNodesPtr == -1) { // no more sub-levels => add one |
189 |
// Text breakage |
189 |
// Text breakage |
190 |
if (lastText.isHtmlTag() && text != null) { |
190 |
if (lastText.isHtmlTag()) { |
191 |
// Set some lines before if previous was specific html tag |
191 |
// Set some lines before if previous was specific html tag |
192 |
// The added text is concerned if the parent has no child yet or is top level and closing html tag |
192 |
// The added text is concerned if the parent has no child yet or is top level and closing html tag |
193 |
boolean setLinesBefore = lastText.separatorsPtr == -1 || (ptr == 0 && lastText.isClosingHtmlTag()); |
193 |
boolean setLinesBefore = lastText.separatorsPtr == -1 || (ptr == 0 && lastText.isClosingHtmlTag()); |
Lines 202-220
Link Here
|
202 |
if (setLinesBefore) { |
202 |
if (setLinesBefore) { |
203 |
switch (lastText.getHtmlTagID()) { |
203 |
switch (lastText.getHtmlTagID()) { |
204 |
case JAVADOC_CODE_TAGS_ID: |
204 |
case JAVADOC_CODE_TAGS_ID: |
205 |
if (text.linesBefore < 2) { |
205 |
if (node.linesBefore < 2) { |
206 |
text.linesBefore = 2; |
206 |
node.linesBefore = 2; |
207 |
} |
207 |
} |
208 |
break; |
208 |
break; |
209 |
case JAVADOC_SEPARATOR_TAGS_ID: |
209 |
case JAVADOC_SEPARATOR_TAGS_ID: |
210 |
case JAVADOC_SINGLE_BREAK_TAG_ID: |
210 |
case JAVADOC_SINGLE_BREAK_TAG_ID: |
211 |
if (text.linesBefore < 1) { |
211 |
if (node.linesBefore < 1) { |
212 |
text.linesBefore = 1; |
212 |
node.linesBefore = 1; |
213 |
} |
213 |
} |
214 |
} |
214 |
} |
215 |
} |
215 |
} |
216 |
// If adding an html tag on same html tag, then close previous one and leave |
216 |
// If adding an html tag on same html tag, then close previous one and leave |
217 |
if (text.isHtmlTag() && !text.isClosingHtmlTag() && text.getHtmlTagIndex() == lastText.getHtmlTagIndex() && !lastText.isClosingHtmlTag()) { |
217 |
if (text != null && text.isHtmlTag() && !text.isClosingHtmlTag() && text.getHtmlTagIndex() == lastText.getHtmlTagIndex() && !lastText.isClosingHtmlTag()) { |
218 |
lastText.closeTag(); |
218 |
lastText.closeTag(); |
219 |
return textHierarchy; |
219 |
return textHierarchy; |
220 |
} |
220 |
} |