Skip to content
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

[BUG] '\n' not work for line break #46

Closed
yi-Xu-0100 opened this issue Feb 14, 2021 · 4 comments
Closed

[BUG] '\n' not work for line break #46

yi-Xu-0100 opened this issue Feb 14, 2021 · 4 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@yi-Xu-0100
Copy link
Collaborator

Describe the bug

When I set the conventionalCommits.lineBreak as '\n', it does not work for me.

To reproduce

  1. win10 Professional 20H2
  2. setting about conventionalCommits:
    "conventionalCommits.autoCommit": false,
    "conventionalCommits.emojiFormat": "emoji",
    "conventionalCommits.lineBreak": "\n",

Expected behavior

Just like the readme says: Set lineBreak configuration to \n. When you're typing, enter \n as a line break.

Screenshots

image

Application logs

Started
VSCode version: 1.53.2
VSCode Conventional Commits version: 1.13.0
Git version: 1.0.0
autoCommit: false
gitmoji: true
emojiFormat: emoji
scopes: 
lineBreak: 

git.enableSmartCommit: true
git.smartCommitChanges: all
git.postCommitCommand: none
arg: d:\4 Creation\github\repo-list-generator
git.repositories: d:\4 Creation\github\repo-list-generator
workspacceFolders: d:\4 Creation\github\repo-list-generator
commitlintRuleConfigs: {}
commitMessage: {
  "_type": "fix",
  "_scope": "",
  "_gitmoji": "🐛",
  "_subject": "test line break",
  "_body": "test\\ntest\\n",
  "_footer": "test\\ntest\\n"
}
message: fix: 🐛 test line break

test\ntest\n

test\ntest\n
inputBox.value: fix: 🐛 test line break

test\ntest\n

test\ntest\n
Finished successfully.
@yi-Xu-0100 yi-Xu-0100 added the help wanted Extra attention is needed label Feb 14, 2021
@yi-Xu-0100
Copy link
Collaborator Author

By now, I test the "conventionalCommits.lineBreak": "\\n", and it works. Maybe we need to fix the README? Or this is a bug?

new log:

Started
VSCode version: 1.53.2
VSCode Conventional Commits version: 1.13.0
Git version: 1.0.0
autoCommit: false
gitmoji: true
emojiFormat: emoji
scopes: 
lineBreak: \n
git.enableSmartCommit: true
git.smartCommitChanges: all
git.postCommitCommand: none
arg: d:\4 Creation\github\repo-list-generator
git.repositories: d:\4 Creation\github\repo-list-generator
workspacceFolders: d:\4 Creation\github\repo-list-generator
commitlintRuleConfigs: {}
commitMessage: {
  "_type": "fix",
  "_scope": "",
  "_gitmoji": "🐛",
  "_subject": "test line break",
  "_body": "test\ntest",
  "_footer": "test1\ntest1"
}
message: fix: 🐛 test line break

test
test

test1
test1
inputBox.value: fix: 🐛 test line break

test
test

test1
test1
Finished successfully.

@vivaxy vivaxy added the bug Something isn't working label Feb 15, 2021
@vivaxy
Copy link
Owner

vivaxy commented Feb 15, 2021

Hi, are you using settings in JSON format?

image

Here is the \n in settings panel, and it works fine on MacOS.
image

@yi-Xu-0100
Copy link
Collaborator Author

@vivaxy Oh, I got it, set the \n in the settings panel equal to set the \\n in JSON format. Thanks! 😀

Maybe we can add additional suggestions in the README. 😅

@vivaxy
Copy link
Owner

vivaxy commented Feb 15, 2021

@yi-Xu-0100 Thank you for your suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants