Added support for comments#99
Open
itsMathew wants to merge 1 commit into
Open
Conversation
This comment was marked as duplicate.
This comment was marked as duplicate.
Author
MattIPv4
reviewed
Oct 9, 2025
Comment on lines
83
to
91
| // Error message | ||
| if (data.message) | ||
| return `${digCmd}\n${data.message}`; | ||
|
|
||
| // No results | ||
| if (!data.answer.length) | ||
| return `${digCmd}\nNo records found${data.flags.cd | ||
| ? `\n\n${DNSSEC_DISABLED_WARNING_MESSAGE}` | ||
| : ''}`; |
Owner
There was a problem hiding this comment.
Do these two early returns need to handle comments?
| return `${output(finalRows)}${data.flags.cd | ||
| ? `\n${DNSSEC_DISABLED_WARNING_MESSAGE}` | ||
| : ''}`; | ||
| : ''}\n${Array.isArray(data.comment) ? `**Comments:** ${data.comment.join("; ")}` : (data.comment ? `**Comments:** ${data.comment}` : "")}`; |
Owner
There was a problem hiding this comment.
👀 Two thoughts here:
- Instead of the current formatting you have for comments, can we make them formatted as a quote perhaps?
- The
maxLength/finalRowslogic doesn't account for the length of the comments you're appending here.
| type, | ||
| `@${provider.dig}`, | ||
| '+noall', | ||
| '+answer', |
Owner
There was a problem hiding this comment.
I think we also need +comments in the equivalent dig command now?
| `@${provider.dig}`, | ||
| '+noall', | ||
| '+answer', | ||
| options.short ? '+short' : null, |
Owner
There was a problem hiding this comment.
In the spirit of the +short option from dig itself, I wonder if we shouldn't show the comments when short is requested?
Owner
|
@mathew2103 any update on this? |
Author
|
Got a bit tied up with uni exams, I will make changes as per the review this week.. Apologies |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Fixes #77