From 3783af8da72eb60b88d8f01f1d6322b41053ea31 Mon Sep 17 00:00:00 2001 From: Elijah Potter Date: Tue, 12 Mar 2024 17:39:35 -0600 Subject: [PATCH] fix(bug): where Go compiler directives weren't detected --- harper-ls/src/comment_parsers/go.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/harper-ls/src/comment_parsers/go.rs b/harper-ls/src/comment_parsers/go.rs index ffb85cac..2324379f 100644 --- a/harper-ls/src/comment_parsers/go.rs +++ b/harper-ls/src/comment_parsers/go.rs @@ -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(); };