(Somewhere between a bug report and a feature request!)
Per #646 Insomnia uses Nunjucks as a templating language, which supports comments in the format of {# comment #} such as:
{
"heck": "yeah" {# great data #}
}
Currently Insomnia does support this technically, but when you complete typing one of these comments, it turns into a light blue clickable button thingy embedded in the text. When you click it, it brings up a modal that has the title "Edit" but no body or other options. There's no other way to edit the comment.
As long as I'm griping, the presence of one of these comments also spoils the otherwise pristine and gorgeous syntax highlighting of my JSON payload! So they are a mixed blessing currently.
Thanks for an awesome REST client!
馃憢 Thanks for opening your first issue! If you're reporting a 馃悶 bug, please make sure
you include steps to reproduce it. If you're requesting a feature 馃巵, please provide real
use cases that would benefit. 馃應
To help make this a smooth process, please be sure you have first read the
contributing guidelines.
Thanks for posting this @tooolbox! The editing should be an easy fix but making the highlighting wor requires writing a custom JSON highlighter and linter (currently using the CodeMirror-provided one). Not impossible, but a lot more work.
Huh. Yeah, I had a look at the CodeMirror parser and that looks rough, man.
...Just to throw it out there, what if you swapped any /* ... */ patterns for {# ... #} before parsing with Nunjucks? Then you could use JS block comments, and at least the syntax highlighting would work, even if the linter still complains.
Bit of a hack, so I'd understand any objections.
+1 for the option to edit comments. When working on APIs it's useful to temporarily omit some parts of the payload.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Any updates on this issue?
could we reopen this? i stumble upon this issue too!
and it would be a really appreciated feature!
Sorry! Not sure why Statebot closed this one
Most helpful comment
+1 for the option to edit comments. When working on APIs it's useful to temporarily omit some parts of the payload.