let do_text b t =
if Buffer.length t > 0 then begin
let s = Buffer.contents t in
- begin
- open_tag b "<$>";
- text b s;
- close_tag b "<$>";
- end;
+ if (!Options.index_empty_texts) || not (is_whitespace s) then
+ begin
+ open_tag b "<$>";
+ Printf.eprintf "Inserting >>%s<<\n" s;
+ text b s;
+ close_tag b "<$>";
+ end;
Buffer.clear t
end