int end = s.getEndLine();
IDocument doc = ed.getDocument();
int soff = doc.getLineOffset(start);
int eoff = lineEndOffset(end, doc);
IntRange editedRegion = new IntRange(soff, eoff);
MarkdownPage page = ed.getMarkdownPage();
StringBuilder sb = new StringBuilder(s.getLength());
for(int i=start; i<=end; i++) {
IRegion para = getParagraph(page, i, ed.getDocument());
if (para==null) {
sb.append(page.getText().get(i));
continue;
}
String paragraph = ed.getDocument().get(para.getOffset(), para.getLength());
// int lines = StrUtils.splitLines(paragraph).length;
String formatted = MarkdownFormatter.format(paragraph, cols);