Skip to content

Commit

Permalink
fix(bug): where Go compiler directives weren't detected
Browse files Browse the repository at this point in the history
  • Loading branch information
elijah-potter committed Mar 12, 2024
1 parent 51e0a9d commit 3783af8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions harper-ls/src/comment_parsers/go.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ impl Parser for Go {
let mut actual = without_intiators(source);
let mut actual_source = actual.get_content(source);

if matches!(source, ['g', 'o', ':', ..]) {
let Some(terminator) = source.iter().position(|c| c.is_whitespace()) else {
if matches!(actual_source, ['g', 'o', ':', ..]) {
let Some(terminator) = source.iter().position(|c| *c == '\n') else {
return Vec::new();
};

Expand Down

0 comments on commit 3783af8

Please sign in to comment.