xml.contribution.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*!-----------------------------------------------------------------------------
  2. * Copyright (c) Microsoft Corporation. All rights reserved.
  3. * Version: 0.31.1(337587859b1c171314b40503171188b6cea6a32a)
  4. * Released under the MIT license
  5. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  6. *-----------------------------------------------------------------------------*/
  7. // src/basic-languages/xml/xml.contribution.ts
  8. import { registerLanguage } from "../_.contribution.js";
  9. registerLanguage({
  10. id: "xml",
  11. extensions: [
  12. ".xml",
  13. ".dtd",
  14. ".ascx",
  15. ".csproj",
  16. ".config",
  17. ".wxi",
  18. ".wxl",
  19. ".wxs",
  20. ".xaml",
  21. ".svg",
  22. ".svgz",
  23. ".opf",
  24. ".xsl"
  25. ],
  26. firstLine: "(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",
  27. aliases: ["XML", "xml"],
  28. mimetypes: ["text/xml", "application/xml", "application/xaml+xml", "application/xml-dtd"],
  29. loader: () => {
  30. if (false) {
  31. return new Promise((resolve, reject) => {
  32. __require(["vs/basic-languages/xml/xml"], resolve, reject);
  33. });
  34. } else {
  35. return import("./xml.js");
  36. }
  37. }
  38. });