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

Feature request to format some of language file in proper format while reading using moar #247

Closed
ciscohack opened this issue Sep 25, 2024 · 1 comment

Comments

@ciscohack
Copy link

Hi Johan,

As you always help me in my problem or feature request. I come up with unusual request to have a feature in moar to format the output in language format when someone use switch --lang while reading a file in moar. Suppose i want to read my long XML code in moar and when I do moar -lang xml then moar reformat the file according to mention language for better readability

walles added a commit that referenced this issue Nov 1, 2024
With this change, JSON files will now be implicitly reformatted before
being displayed.

This can be disabled with the `--no-reformat` switch.

Inspired by these two requests:
- #247
- #246
@walles
Copy link
Owner

walles commented Nov 10, 2024

I have done this for JSON, with the --reformat flag.

I think for XML this might be too hard, there's so much about XML I don't understand and I'm afraid I'd just screw up if I tried to format it. Including by using third party libraries for the formatting.

So for XML this is a no, sorry.

@walles walles closed this as completed Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants