Please add XML formatting and syntax highlighting support to this project.
Detailed Requirements:
- Add a
format_xml boolean configuration option under the response section in the config schema.
- Create an XML utility function (prefer standard library
xml.dom.minidom) to pretty-print raw XML strings. Ensure malformed XML safely falls back to returning the raw text.
- Detect when a response's Content-Type header includes
application/xml or text/xml. If format_xml is enabled, format the response body before passing it to the UI component.
- Ensure the Textual TextArea UI component sets syntax highlighting to "xml" for XML responses.
- Add a "Format XML" command to the command palette so users can format XML in the request body editor.
- Add unit tests in the
tests/ directory verifying the XML formatting utility and Content-Type matching logic.
Please add XML formatting and syntax highlighting support to this project.
Detailed Requirements:
format_xmlboolean configuration option under theresponsesection in the config schema.xml.dom.minidom) to pretty-print raw XML strings. Ensure malformed XML safely falls back to returning the raw text.application/xmlortext/xml. Ifformat_xmlis enabled, format the response body before passing it to the UI component.tests/directory verifying the XML formatting utility and Content-Type matching logic.