use of org.commonmark.node.Text in project gitiles by GerritCodeReview.
the class MarkdownUtil method trimPreviousWhitespace.
static void trimPreviousWhitespace(Node node) {
Node prev = node.getPrevious();
if (prev instanceof Text) {
Text prevText = (Text) prev;
String s = prevText.getLiteral();
prevText.setLiteral(CharMatcher.whitespace().trimTrailingFrom(s));
}
}