diff options
author | 2020-11-18 19:55:59 -0500 | |
---|---|---|
committer | 2020-11-18 18:55:59 -0600 | |
commit | a935456acab0c7bdc021829e18ce20230e18c752 (patch) | |
tree | e61eed13a433381ba223a4ca962e904c8740fc91 /source/helpers/smart-block-wrap.ts | |
parent | cab33f6f47c4eef0a3bc793f2004767f34b6abe9 (diff) | |
download | refined-github-20.11.19.tar.gz refined-github-20.11.19.tar.zst refined-github-20.11.19.zip |
Lint (#3723)20.11.19
Diffstat (limited to 'source/helpers/smart-block-wrap.ts')
-rw-r--r-- | source/helpers/smart-block-wrap.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/helpers/smart-block-wrap.ts b/source/helpers/smart-block-wrap.ts index 10a368cd..8d51fb48 100644 --- a/source/helpers/smart-block-wrap.ts +++ b/source/helpers/smart-block-wrap.ts @@ -1,7 +1,10 @@ // Wraps string in at least two newlines on each side, // as long as the field doesn't already have them. // Code adapted from GitHub. -export default function smartBlockWrap(content: string, field: HTMLTextAreaElement): string { +export default function smartBlockWrap( + content: string, + field: HTMLTextAreaElement +): string { const before = field.value.slice(0, field.selectionStart); const after = field.value.slice(field.selectionEnd); const [whitespaceAtStart] = /\n*$/.exec(before)!; |