sbarex / SourceCodeSyntaxHighlight

Quick Look extension for highlight source code files on macOS 10.15 and later.
GNU General Public License v3.0
3.02k stars 72 forks source link

XML is not working #207

Open alanwilter opened 2 years ago

alanwilter commented 2 years ago

But it does work for KML for example. Since I had issues with json as well, I noticed both were linked to Xcode for default opening.

I'm wondering if this is the issue. But see below:

mdls -name kMDItemContentType -name kMDItemContentTypeTree /Users/alan/Dropbox/sqldeveloper.xml
kMDItemContentType     = "public.xml"
kMDItemContentTypeTree = (
    "public.xml",
    "public.text",
    "public.data",
    "public.item",
    "public.content"
)

From Inquiry Format

Screenshot 2022-11-18 at 10 39 42
sbarex commented 1 year ago

Very strange, in my system (macOS 13.0.1) they open correctly.

sopi20 commented 1 year ago

i have the exactly same problem with xml files.... any ways how I can help with debugging the issue ?

safris commented 1 year ago

Same problem for me too.

v2.1.18 (67) macOS 13.3.1

grigaman commented 1 year ago

I also have Microsoft office installed and have the same problem - quicklook is not working for xml files. I think this is because excel and word define new content types for xml extension:

        <dict>
            <key>CFBundleTypeExtensions</key>
            <array>
                <string>xml</string>
            </array>
            <key>CFBundleTypeIconFile</key>
            <string>XMLS.icns</string>
            <key>CFBundleTypeName</key>
            <string>Microsoft Excel XML Spreadsheet (.xml)</string>
            <key>CFBundleTypeOSTypes</key>
            <array>
                <string>XMLS</string>
            </array>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>DocumentTypeSection</key>
            <string>Disabled</string>
            <key>LSHandlerRank</key>
            <string>Default</string>
            <key>LSItemContentTypes</key>
            <array>
                <string>com.microsoft.excel.xml</string>
            </array>
            <key>NSDocumentClass</key>
            <string>XLWorkbookDocument</string>
        </dict>
        <dict>
            <key>CFBundleTypeExtensions</key>
            <array>
                <string>xml</string>
            </array>
            <key>CFBundleTypeIconFile</key>
            <string>WXML.icns</string>
            <key>CFBundleTypeName</key>
            <string>Microsoft Word XML document (.xml)</string>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>DocumentTypeSection</key>
            <string>Specialty</string>
            <key>LSHandlerRank</key>
            <string>Owner</string>
            <key>LSItemContentTypes</key>
            <array>
                <string>com.microsoft.word.wordprocessingml</string>
            </array>
            <key>NSDocumentClass</key>
            <string>WDDocument</string>
        </dict>
        <dict>
            <key>CFBundleTypeExtensions</key>
            <array>
                <string>xml</string>
            </array>
            <key>CFBundleTypeIconFile</key>
            <string>WXML.icns</string>
            <key>CFBundleTypeName</key>
            <string>Microsoft Word 2003 XML document (.xml)</string>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>DocumentTypeSection</key>
            <string>Specialty</string>
            <key>LSHandlerRank</key>
            <string>Owner</string>
            <key>LSItemContentTypes</key>
            <array>
                <string>com.microsoft.word.wordml</string>
            </array>
            <key>NSDocumentClass</key>
            <string>WDDocument</string>
        </dict>

Because of this, I think, when quicklook plugin process the file it resolve xml file as one of excel/word content type and doesn't process it. Dear developers, could you please add these 3 content types to your configuration? I think it should fix the problem.

lokhman commented 1 year ago

Exactly the same problem here.

brgale commented 1 year ago

Same issue here on Monterey. Anybody figured out a fix or workaround?

runxel commented 1 year ago

Will this be here stale as a works-for-me-dont-fix??? :( I think there must be some way to reenable this for everybody.

yuyinitos commented 1 year ago

Doesn't work for .xml and .ts file on MacOS Ventura. Exactly the extensions I need to preview :(

sopi20 commented 1 year ago

Didn't work in ventura 🤷‍♂️, but in sonoma works like a charm 👍

yuyinitos commented 1 year ago

Didn't work in ventura 🤷‍♂️, but in sonoma works like a charm 👍

Still not working after upgrading to Sonoma :(