mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-16 02:06:18 +01:00
Move escapeWhitespace to diffs and add small test
This commit is contained in:
@@ -39,3 +39,7 @@ export function createHunkIdentifier(file: File, hunk: Hunk) {
|
||||
export function createHunkIdentifierFromContext(ctx: BaseContext) {
|
||||
return createHunkIdentifier(ctx.file, ctx.hunk);
|
||||
}
|
||||
|
||||
export function escapeWhitespace(path: string) {
|
||||
return path.toLowerCase().replace(/\W/g, "-");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user