Skip to content

Add support for double hyphen line comments, used in SQL et al. #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"properties": {
"reflowlist.commentRegexp": {
"type": "string",
"default": "^\\s*(?://|#|\\>)",
"default": "^\\s*(?://|#|\\>|--)",
"description": "Regular expression matching comments to reformat. This does not include ' * ' for multiline /* ... */ comments; these are handled separately."
},
"reflowlist.listStartRegexp": {
Expand Down
10 changes: 9 additions & 1 deletion src/test/suite/extension.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ A grandiose topic
*/`, done);
});


test('markdown block quote', (done) => {
reflowDocument(`
> Great quote from some
Expand All @@ -222,4 +221,13 @@ A grandiose topic
`, done);
});

test('sql line comments', (done) => {
reflowDocument(`
-- Great quote from some
-- hallowed piece of literature.
`, 1, `
-- Great quote from some hallowed piece of literature.
`, done);
});

});