Skip to content

Commit

Permalink
Formatter: Remove leading newline (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
akd-io authored Oct 27, 2024
1 parent bcec55d commit 3db09c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/src/parser/formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ export default class Formatter {
formatted = formatted.split('\n').map(line => line.trimRight()).join('\n');

if (!isPlainLuaFile) {
// Add whitespace buffer at beginning and end
formatted = '\n' + formatted + '\n';
// Add whitespace buffer at the end
formatted = formatted + '\n';

// add an extra newline if we found an ending tag (__gfx__ for example)
if (formatRange.end.line !== Number.MAX_VALUE) {
Expand Down

0 comments on commit 3db09c2

Please sign in to comment.