private void formatClassFeatures(StringBuilder formatted, List<String> features) {
        if (!features.isEmpty()) {
            formatted.append("\\n|");
            boolean first = true;
            for (String feature : features) {
                if (first) {
                    first = false;
                }
                else {
                    formatted.append("\\n");
                }
                formatted.append(ensureTextIsValid(feature));
            }
        }
    }