Skip to content

Add XML formatting and syntax highlighting support #1

Description

@yizzy

Please add XML formatting and syntax highlighting support to this project.

Detailed Requirements:

  1. Add a format_xml boolean configuration option under the response section in the config schema.
  2. 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.
  3. 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.
  4. Ensure the Textual TextArea UI component sets syntax highlighting to "xml" for XML responses.
  5. Add a "Format XML" command to the command palette so users can format XML in the request body editor.
  6. Add unit tests in the tests/ directory verifying the XML formatting utility and Content-Type matching logic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions