Glavin001 / atom-beautify

:mega: Help Wanted - Looking for Maintainer: https://github.com/Glavin001/atom-beautify/issues/2572 | :lipstick: Universal beautification package for Atom editor (:warning: Currently migrating to https://github.com/Unibeautify/ and have very limited bandwidth for Atom-Beautify Issues. Thank you for your patience and understanding :heart: )
http://unibeautify.com/
MIT License
1.5k stars 453 forks source link

Please add kml to list of known file types #1014

Open jstafford opened 8 years ago

jstafford commented 8 years ago

Description

When I try to beautify a kml file I get the error "Atom Beautify could not find a supported beautifier for this file". kml is Google's Keyhole Markup Language, which is an XML extension. As far as I know, the existing xml beautifier should work unchanged on kml.

Expected Results

Atom Beautifier should be able to beautify xml files that have different extensions, but are still valid xml

If you wanted to thoroughly fix this bug you would go to http://www.iana.org/assignments/media-types/media-types.xhtml and take all the mime types that end +xml and then open the related RFC files and get the matching extensions for those files, and add them to the list of extensions that are really xml files.

Actually someone already did this at http://data.okfn.org/data/core/media-types

So parsing their results I see that you would need to add: atom atomcat atomsvc ccxml davmount xdssc ink inkml lostxml mads mrcx mscml meta4 mets mods opf xer pls pskcxml rdf rif rld rl rs sbml shf smi smil grxml sru ssml tei teicorpus tfi xdp mpkg cdxml wbs uvt uvvt es3 et3 kml hal zmm irp lasxml lbe xul dd2 musicxml link66 sdkm sdkd xdm xsm uoml osfpvg zaz vxml wsdl wspolicy xdf xenc xhtml xht xop mxml xhvml xvml xvm yin dae x3d x3dz

You can see how I generated this list at: https://docs.google.com/spreadsheets/d/17GVaQtXXnJIYF033JZx17gytjPkva4WFFOd-gBCO3vU/edit?usp=sharing

Steps to Reproduce

  1. Download sample KML file KML_Samples.kml from https://developers.google.com/kml/documentation/kml_tut
  2. Run command Atom Beautify: Beautify Editor
  3. Get the error "Atom Beautify could not find a supported beautifier for this file"

    Checklist

    • [ ] I have tried uninstalling and reinstalling Atom Beautify to ensure it installed properly
    • [x] I have reloaded (or restarted) Atom to ensure it is not a caching issue
    • [x] Searched for existing Atom Beautify Issues at https://github.com/Glavin001/atom-beautify/issues so I know this is not a duplicate issue
    • [ ] Generated debugging information and added link for debug.md Gist to this issue
prettydiff commented 8 years ago

Just fork this project and modify the file src/languages/xml.coffee and once complete just submit a pull request.