
Bug: PLIST Syntax Highlighting
Reported by zachriggle | December 24th, 2010 @ 07:23 AM | in 0.0.3
What I did
Open a .plist
file.
What I expected to happen
XML syntax highlighting.
What actually happened
No syntax highlighting.
Remarks
I noticed that you use the hashbang to determine the file type
(e.g., #!/bin/sh
is a Shell file, even without an
extension). Checking for a file whose first four non-space,
non-XML-comment characters are <?xml
would provide
a similar heuristic for XML.
Free Regex Magic
If it matches this multi-line expression, it should be an XML file.
(([ \t\n]*)(<\!-{2,}.*?-{2,}>)([
\t\n]*))<\?xml
Note: The [ \t\n]
chunk should be able to
be replaced by \s
, but for some reason
egrep
didn't like it.
Comments and changes to this ticket
-
rsms December 26th, 2010 @ 08:28 PM
- Milestone set to 0.0.3
- State changed from new to resolved
- Assigned user set to rsms
- Tag set to syntaxhighlight, xml
- Milestone order changed from 36 to 0
Kod currently only looks at the first line of the file (but does trim leading whitespace and newlines), so I've use a simple regular expression:
^<\?xml
-
znn.yyy May 28th, 2022 @ 11:00 AM
เล่น มายคราฟ สร้างบ้าน เล่น Pg slot สร้างเงิน มารู้จักเกมมายคราฟ เป็นเกมที่ผู้เล่นสามารถสร้างสรรค์ตัวละคร เเต่เกม Pg slot ของเรา เล่นง่าย เเละยังได้ลุ้นรับเงินจำนวนมาก
-
Billie Jollie January 19th, 2023 @ 06:00 AM
Although I had originally planned to accomplish that, I don't believe there is a problem with Rouge specifically. Rouge's "Plist" syntax highlighting only applies to one of many distinct.plist file types.
According to what I can tell, Rouge does not have auto detection, word wipe hence this is a GitLab bug. The file should be identified as XML by GitLab's file type detection, which should instruct Rouge to highlight it as such.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
A text editor for Mac OS X