parseCodeWithLanguage static method

String parseCodeWithLanguage({
  1. required String text,
  2. required String languageCode,
  3. required GeneralLibParseModeType generalLibParseModeType,
})

Implementation

static String parseCodeWithLanguage({
  required String text,
  required String languageCode,
  required GeneralLibParseModeType generalLibParseModeType,
}) {
  switch (generalLibParseModeType) {
    case GeneralLibParseModeType.html:
      return parseHtmlCodeWithLanguage(text, languageCode);
    case GeneralLibParseModeType.markdown:
      return parseMarkdownCodeWithLanguage(text, languageCode);
    default:
      return text;
  }
}