File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -810,16 +810,15 @@ export class ExampleGenerationPage extends BasePage {
810810
811811 await expect ( line ) . toBeVisible ( { timeout : 10000 } ) ;
812812
813- const originalText = await line . innerText ( ) ;
814- const leadingSpaces = originalText . match ( / ^ \s * / ) ?. [ 0 ] ?? "" ;
815-
816813 await line . scrollIntoViewIfNeeded ( ) ;
817814 await line . click ( ) ;
818815
816+ // In CodeMirror, Home lands at first non-whitespace for indented lines.
817+ // Replacing from there keeps existing indentation unchanged.
819818 await this . page . keyboard . press ( "Home" ) ;
820819 await this . page . keyboard . press ( "Shift+End" ) ;
821820
822- await this . page . keyboard . type ( leadingSpaces + edit . changeTo ) ;
821+ await this . page . keyboard . type ( edit . changeTo ) ;
823822
824823 takeAndAttachScreenshot (
825824 this . page ,
You can’t perform that action at this time.
0 commit comments