Skip to content

Broken syntax highlighting for .plist files

Summary

Apple .plist files with XML contents get incorrect syntax highlighting (probably that of binary .plist files)

Steps to reproduce

Save the following as Info.plist and put it in a GitLab repository:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDisplayName</key>
	<string>My package</string>
	<key>CFBundleIdentifier</key>
	<string>org.gitlab.mypackage</string>
	<key>CFBundleShortVersionString</key>
	<string>3.1</string>
	<key>CFBundleVersion</key>
	<string>3.1.0.0</string>
	<key>UIDeviceFamily</key>
	<array>
		<integer>1</integer>
	</array>
</dict>
</plist>

What is the current bug behavior?

Some weird syntax highlighting preset gets applied that highlights all non-hex characters in XML tag names. plist

What is the expected correct behavior?

The same result as if the file was named Info.xml.

Results of GitLab environment info

Expand for output related to GitLab environment info

System information System: Ubuntu 16.04 Current User: git Using RVM: no Ruby Version: 2.3.5p376 Gem Version: 2.6.13 Bundler Version:1.13.7 Rake Version: 12.1.0 Redis Version: 3.2.5 Git Version: 2.13.5 Sidekiq Version:5.0.4 Go Version: unknown

GitLab information Version: 10.1.0 Revision: 5a695c4 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: http://redacted.lan HTTP Clone URL: http://redacted.lan/some-group/some-project.git SSH Clone URL: git@redacted.lan:some-group/some-project.git Using LDAP: yes Using Omniauth: no

GitLab Shell Version: 5.9.3 Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git