mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
trimPluginDescription: use first line's indentation instead
This commit is contained in:
parent
698174a584
commit
26c460e67a
1 changed files with 2 additions and 2 deletions
|
@ -53,8 +53,8 @@ export interface CommandInfo {
|
|||
export function trimPluginDescription(str) {
|
||||
const emptyLinesTrimmed = trimEmptyStartEndLines(str);
|
||||
const lines = emptyLinesTrimmed.split("\n");
|
||||
const lastLineIndentation = (lines[lines.length - 1].match(/^ +/g) || [""])[0].length;
|
||||
return trimIndents(emptyLinesTrimmed, lastLineIndentation);
|
||||
const firstLineIndentation = (lines[0].match(/^ +/g) || [""])[0].length;
|
||||
return trimIndents(emptyLinesTrimmed, firstLineIndentation);
|
||||
}
|
||||
|
||||
const inviteCache = new SimpleCache<Promise<Invite>>(10 * MINUTES, 200);
|
||||
|
|
Loading…
Add table
Reference in a new issue