builder.append(body.text().replaceAll("<br/>", "\n")).append("\n");
}
}
protected void addExamples(Document doc, StringBuilder builder) {
Elements tables = doc.getElementsByTag("table");
if (!tables.isEmpty()) {
builder.append("Examples:\n");
Element table = tables.first();
Elements headers = table.select("tr").first().select("th");
for (Element header : headers) {
builder.append("|").append(header.text());
}
builder.append("|\n");
Elements data = table.select("tr");
for (int i = 1; i < data.size(); i++) {
for (Element cell : data.get(i).select("td")) {
builder.append("|").append(cell.text());
}
builder.append("|\n");
}
}