-
Notifications
You must be signed in to change notification settings - Fork 13
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a couple of minor comment-related things, but it looks good!
lib/utils/buildDocs.js
Outdated
.join('\n')}\n${prepend}\`\`\`` | ||
: `\`${prepQuote(val)}\``; | ||
const quoteOrNa = (val, triple = false, prepend = '') => | ||
val ? quote(val, triple, prepend) : '_n/a_'; | ||
|
||
const formatExample = example => { | ||
const ex = _.isPlainObject(example) ? _.omit(example, SKIP_KEY) : example; | ||
return `* ${quoteOrNa( | ||
// GH parses the newlines in bullets correctly, but it's a good thing to fix | ||
// docs say Infinity for no line break at all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can remove these comments as they're no longer relevant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah -- good call!
lib/utils/buildDocs.js
Outdated
const quote = (val, triple, prepend = '') => | ||
triple && val.length > BREAK_LENGTH | ||
? `\`\`\`\n${val | ||
.match(/[^\r\n]+/g) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this section is a little opaque. could you add comments about the desired before and after?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Makes those long examples a little more readable.