Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update XML to v0.0.7 #1506

Merged
merged 1 commit into from
Oct 10, 2024
Merged

Update XML to v0.0.7 #1506

merged 1 commit into from
Oct 10, 2024

Conversation

sweetppro
Copy link
Contributor

remove hard coded path extensions in favor of first_line_pattern regex

remove hard coded path extensions in favor of first_line_pattern regex
@cla-bot cla-bot bot added the cla-signed label Oct 10, 2024
@notpeter
Copy link
Member

notpeter commented Oct 10, 2024

first_line_pattern = '^<.*xml'

Is there a reason you're not just using <\? *xml - Are there other possibilities for valid XML headers besides which you are trying to match besides these:

<?xml 
<? xml
<?        xml

@sweetppro
Copy link
Contributor Author

Xliff files for example can use something like:
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">

@maxdeviant maxdeviant changed the title update XML to v0.0.7 Update XML to v0.0.7 Oct 10, 2024
@notpeter notpeter merged commit 1cc060b into zed-industries:main Oct 10, 2024
2 checks passed
@notpeter
Copy link
Member

FYI I added a little bit of official docs for this too.
So if your regex isn't working for folks they can just add their own extensions.
https://zed.dev/docs/languages/xml

@sweetppro
Copy link
Contributor Author

@notpeter when will the update be live in the gallery?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants