in doxia-core/src/main/java/org/apache/maven/doxia/index/IndexingSink.java [151:186]
public void text(String text, SinkEventAttributes attributes) {
if (isTitle) {
rootEntry.setTitle(text);
} else {
switch (this.type) {
case SECTION_1:
case SECTION_2:
case SECTION_3:
case SECTION_4:
case SECTION_5:
case SECTION_6:
// -----------------------------------------------------------------------
// Sanitize the id. The most important step is to remove any blanks
// -----------------------------------------------------------------------
// append text to current entry
IndexEntry entry = stack.lastElement();
String title = entry.getTitle();
if (title != null) {
title += text;
} else {
title = text;
}
title = title.replaceAll("[\\r\\n]+", "");
entry.setTitle(title);
setEntryId(entry, title);
break;
// Dunno how to handle others yet
default:
break;
}
}
super.text(text, attributes);
}