parseSync method

List<TextElement> parseSync(
  1. String text, {
  2. bool onlyMatches = false,
})

Parses the provided text according to the matchers specified in the constructor.

The result contains all the elements in text including the ones not matching any pattern provided by matchers unless onlyMatches is set to true explicitly.

Implementation

List<TextElement> parseSync(String text, {bool onlyMatches = false}) {
  return text.isEmpty ? [] : _parser.parse(text, onlyMatches: onlyMatches);
}