File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -512,7 +512,7 @@ def set_clock(self, seconds: Optional[float]) -> None:
512
512
self .comment , found = CLOCK_REGEX .subn (clk , self .comment , count = 1 )
513
513
514
514
if not found and clk :
515
- if self .comment and not self .comment .endswith (" " ):
515
+ if self .comment and not self .comment .endswith (" " ) and not self . comment . endswith ( " \n " ) :
516
516
self .comment += " "
517
517
self .comment += clk
518
518
@@ -546,7 +546,7 @@ def set_emt(self, seconds: Optional[float]) -> None:
546
546
self .comment , found = EMT_REGEX .subn (emt , self .comment , count = 1 )
547
547
548
548
if not found and emt :
549
- if self .comment and not self .comment .endswith (" " ):
549
+ if self .comment and not self .comment .endswith (" " ) and not self . comment . endswith ( " \n " ) :
550
550
self .comment += " "
551
551
self .comment += emt
552
552
You can’t perform that action at this time.
0 commit comments