Skip to content

Commit

Permalink
fix wrong modified_js content when indented
Browse files Browse the repository at this point in the history
  • Loading branch information
phil294 committed May 20, 2022
1 parent f870c2c commit 07662eb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/src/services/transpileService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,10 @@ const try_translate_coffee = (coffee_doc: TextDocument): ITranspilationResult =>
if(coffee_error_line.endsWith('?' + end))
end = '?' + end
// Still need the `𒐩` to detect the fake js line further below
if(try_fake_line_compilation(coffee_error_line.substring(0, coffee_error_line.length - end.length) + '𒐩')) {
if(try_fake_line_compilation(
(coffee_error_line
.substring(0, coffee_error_line.length - end.length) + '𒐩'
).trim())) {
fake_line_mechanism = 'modified_js'
fake_line_modified_js_end_removed = end
}
Expand Down

0 comments on commit 07662eb

Please sign in to comment.