diff --git a/cli/src/tags.rs b/cli/src/tags.rs index 86eb2e33..c65d5479 100644 --- a/cli/src/tags.rs +++ b/cli/src/tags.rs @@ -39,7 +39,7 @@ pub fn generate_tags(loader: &Loader, scope: Option<&str>, paths: &[String]) -> for tag in context.generate_tags(tags_config, &source) { write!( &mut stdout, - " {:<8}\t{:<40}\t{:>9}-{:<9}", + " {:<8} {:<40}\t{:>9}-{:<9}", tag.kind, str::from_utf8(&source[tag.name_range]).unwrap_or(""), tag.span.start, diff --git a/tags/src/lib.rs b/tags/src/lib.rs index c3a52303..566efe52 100644 --- a/tags/src/lib.rs +++ b/tags/src/lib.rs @@ -393,7 +393,7 @@ where *pattern_index = mat.pattern_index; *tag = Tag { line_range: line_range(self.source, range.start, MAX_LINE_LEN), - span: tag_node.start_position()..tag_node.start_position(), + span: tag_node.start_position()..tag_node.end_position(), kind, range, name_range, @@ -406,7 +406,7 @@ where ( Tag { line_range: line_range(self.source, range.start, MAX_LINE_LEN), - span: tag_node.start_position()..tag_node.start_position(), + span: tag_node.start_position()..tag_node.end_position(), kind, range, name_range,