protected Gtk.TextBuffer text_buffer;
protected Gtk.TextView text;
protected Regex unhtml;
+ protected Regex seplines;
public string grm_name { get; set; }
public string grm_type { get; set; }
grm_name = "";
grm_type = "";
unhtml = new Regex("[ ]*<[^>]+>[ ]*", 0, 0);
+ seplines = new Regex("\n");
text_buffer = new Gtk.TextBuffer(null);
text = new Gtk.TextView.with_buffer(text_buffer);
text.wrap_mode = Gtk.WrapMode.WORD;
if (grm_type == "line/html" || grm_type == "block/html")
{
result = unhtml.replace(result, (long)res_len, 0, " ", 0);
+ } else if (grm_type == "line/text") {
+ result = seplines.replace(result, (long)res_len, 0, "\n\n", 0);
}
+
text_buffer.text = result;
Gtk.TextIter iter;