Skip to content

Commit

Permalink
add 0 column number to output
Browse files Browse the repository at this point in the history
  • Loading branch information
flocks committed Sep 27, 2024
1 parent 41774bf commit c18ce7e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void print_result(TSNode node, char* source_code, char* file_name) {
int i = 0;
while(ptr != NULL) {
if (i == 0) {
printf("%s:%d:%s\n", file_name, i + point.row + 1, ptr);
printf("%s:%d:0:%s\n", file_name, i + point.row + 1, ptr);
} else {
printf("%s-%d-%s\n", file_name, i + point.row + 1, ptr);
}
Expand Down
2 changes: 1 addition & 1 deletion test/expected/exclude_one_prop.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
test/samples/file.tsx:8:<Button size="large">
test/samples/file.tsx:8:0:<Button size="large">
--
2 changes: 1 addition & 1 deletion test/expected/include_one_exclude_one.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
test/samples/file.tsx:9:<Button variant="secondary">
test/samples/file.tsx:9:0:<Button variant="secondary">
--
4 changes: 2 additions & 2 deletions test/expected/one_prop.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
test/samples/file.tsx:5:<Button variant="primary" size="large">
test/samples/file.tsx:5:0:<Button variant="primary" size="large">
--
test/samples/file.tsx:9:<Button variant="secondary">
test/samples/file.tsx:9:0:<Button variant="secondary">
--
6 changes: 3 additions & 3 deletions test/expected/simple.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
test/samples/file.tsx:5:<Button variant="primary" size="large">
test/samples/file.tsx:5:0:<Button variant="primary" size="large">
--
test/samples/file.tsx:8:<Button size="large">
test/samples/file.tsx:8:0:<Button size="large">
--
test/samples/file.tsx:9:<Button variant="secondary">
test/samples/file.tsx:9:0:<Button variant="secondary">
--

0 comments on commit c18ce7e

Please sign in to comment.