nextcloud / files_texteditor

:page_facing_up: Text editor for plaintext files
72 stars 41 forks source link

YAML syntax highlighting not working #477

Open joschaschmiedt opened 3 years ago

joschaschmiedt commented 3 years ago

Steps to reproduce

  1. Create a yaml file, e.g.
    doe: "a deer, a female deer"
    ray: "a drop of golden sun"
    pi: 3.14159
    xmas: true
    french-hens: 3
    calling-birds:
    - huey
    - dewey
    - louie
    - fred

Expected behaviour

Syntax highlighting should be visible, similar to JSON.

Actual behaviour

All text remains black

Server configuration

Operating system: Linux 4.19.0-14-amd64 x86_64

Web server:

Database: type: mysql Version: 10.3.27 Size: 2.6 MB

PHP version:

Version: 7.3.27 Memory Limit: 2 GB Max Execution Time: 3600 Upload max size: 1 GB

Nextcloud version: 21.0.4

joschaschmiedt commented 3 years ago

Could this be due to the fact that https://github.com/nextcloud/files_texteditor/blob/master/js/SyntaxMode.js doesn't actually contain code for YAML? YAML is listed in https://github.com/nextcloud/files_texteditor/blob/master/js/supported_mimetypes.json though.