highLightSpans function
transform code to highlight code
Implementation
List<InlineSpan> highLightSpans(
String input, {
String? language,
bool autoDetectionLanguage = false,
Map<String, TextStyle> theme = const {},
TextStyle? textStyle,
TextStyle? styleNotMatched,
int tabSize = 8,
}) {
return convertHiNodes(
hi.highlight
.parse(input.trimRight(),
language: autoDetectionLanguage ? null : language,
autoDetection: autoDetectionLanguage)
.nodes!,
theme,
textStyle,
styleNotMatched);
}