align SyntaxText API with upstream

This commit is contained in:
Aleksey Kladov 2019-07-20 16:52:11 +03:00
parent 6b352ffeb3
commit f6bcc2d745
9 changed files with 18 additions and 24 deletions

View file

@ -31,7 +31,7 @@ pub(crate) fn folding_ranges(file: &SourceFile) -> Vec<Fold> {
// Fold items that span multiple lines
if let Some(kind) = fold_kind(element.kind()) {
let is_multiline = match &element {
SyntaxElement::Node(node) => node.text().contains('\n'),
SyntaxElement::Node(node) => node.text().contains_char('\n'),
SyntaxElement::Token(token) => token.text().contains('\n'),
};
if is_multiline {