#3514 Turn on syntax highlighting for yaml files
Opened 5 years ago by psss. Modified 4 years ago

Currently it seems Pagure highlights only files with "yml" suffix:

It would be nice to have highlighting for "yaml" suffix as well:

I think the "yaml" suffix is quite commonly used as well.


Pagure 5.0 does the highlighting differently, so let's see how it behaves once we've pushed it out.

Metadata Update from @pingou:
- Issue tagged with: RFE

5 years ago

It seems that yaml files are still not handled correctly. Tested with Pagure 5.1.3. Here are some examples of weirdly formatted files:

Basically all files in this directory can be used for testing:

Renaming the file extension to yaml or yml had no effect.

It's really hard to read files with this broken syntax highlight:

@pingou, can we do something with that? Or shall we at least disable yaml highlight until it gets fixed? Thanks.

looks like everything that's not markup or binary gets passed through the highlight.js javascript library. We would need a new output type for this, but maintaining a list of file suffixes for that doesn't scale (btw. .fmf is already used for Fax Man Documents) . I'd suggest switching to raw output for now.

Agreed, the raw output would be much more readable for unknown file types rather than applying the javascript highligting. However it seems that files with the yaml extension are still highlighted incorrectly:

@pingou, @karsten, could we improve the highlighting somehow? I think even turning it off for selected file extensions would be better than the current status which is very hard to read.

@pingou, @karsten, could we at least turn it off for fmf files?

Login to comment on this ticket.

Metadata