-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Currently the regex can't add comma to JavaScript objects which has more than 2 variables
For example :
{
hello: 'world',
foo: 'bar'
};This will turn into :
{
hello: 'world',
foo: 'bar'; // Notice the line break? 🤔
};Now the python regex that i am using is :
NEW_LINE_REPLACE_PATTERN: Pattern = re.compile(
r"(?!^)(?<![\s{,\"\`;])\n(?!^(\s\S*($|[\"\`)$]|)}))(?![\w\s]*[\)])"
)Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed