List<String> (String fileText) { List<String> result = new ArrayList<>(); try { try (BufferedReader reader = new BufferedReader(new StringReader(fileText))) { String line; while ((line = reader.readLine()) != null) { line = line.trim(); if (line.startsWith("//") || line.startsWith("##")) { String uncommentedLine = line.substring(2).trim(); if (!uncommentedLine.isEmpty()) { result.add(uncommentedLine); } } else if (line.startsWith("<!--")) { String uncommentedLine = StringsKt.substringBefore(line.substring(4), "-->", "").trim(); if (!uncommentedLine.isEmpty()) { result.add(uncommentedLine); } } } } } catch (IOException e) { throw ExceptionUtilsKt.rethrow(e); } return result; }