Skip to content

Commit

Permalink
Trim file tags for \r
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielGavin committed Sep 22, 2024
1 parent 23bd4b3 commit c68b7f5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/odin/printer/printer.odin
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,12 @@ print_file :: proc(p: ^Printer, file: ^ast.File) -> string {
p.document = empty()

for tag in file.tags {
p.document = cons(p.document, text(tag.text), newline(1))
p.document = cons(p.document, text(strings.trim(tag.text, "\r\n")), newline(1))
pos := tag.pos
pos.line += 1
set_source_position(p, pos)
}


p.document = cons(p.document, move_line(p, file.pkg_token.pos))
p.document = cons(p.document, cons_with_nopl(text(file.pkg_token.text), text(file.pkg_name)))

Expand Down

0 comments on commit c68b7f5

Please sign in to comment.