in doxia-core/src/main/java/org/apache/maven/doxia/index/IndexingSink.java [274:305]
public void text(String text) {
switch (this.type) {
case TITLE:
this.title = text;
break;
case TYPE_SECTION_1:
case TYPE_SECTION_2:
case TYPE_SECTION_3:
case TYPE_SECTION_4:
case TYPE_SECTION_5:
// -----------------------------------------------------------------------
// 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() + text;
title = title.replaceAll("[\\r\\n]+", "");
entry.setTitle(title);
entry.setId(getUniqueId(DoxiaUtils.encodeId(title)));
break;
// Dunno how to handle these yet
case TYPE_DEFINED_TERM:
case TYPE_FIGURE:
case TYPE_TABLE:
default:
break;
}
}