Skip to content

Commit 5c1ff81

Browse files
committed
Avoid lookbehind (not supported in Safari)
1 parent b71972b commit 5c1ff81

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

build/azure-pipelines/darwin/product-build-darwin.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ steps:
159159
set -e
160160
yarn test-browser --build --browser chromium --browser webkit --browser firefox --tfs "Browser Unit Tests"
161161
displayName: Run unit tests (Browser)
162-
timeoutInMinutes: 10
162+
timeoutInMinutes: 5
163163
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
164164
165165
- script: |

src/vs/editor/contrib/linesOperations/linesOperations.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,11 @@ export class SnakeCaseAction extends AbstractCaseAction {
10561056
}
10571057

10581058
protected _modifyText(text: string, wordSeparators: string): string {
1059-
return text.replace(/(?<=\p{Ll})(\p{Lu})|(?<!\b|_)(\p{Lu})(?=\p{Ll})/gmu, '_$&').toLocaleLowerCase();
1059+
return (text
1060+
.replace(/(\p{Ll})(\p{Lu})/gmu, '$1_$2')
1061+
.replace(/([^\b_])(\p{Lu})(\p{Ll})/gmu, '$1_$2$3')
1062+
.toLocaleLowerCase()
1063+
);
10601064
}
10611065
}
10621066

0 commit comments

Comments
 (0)