tags: Fix typo in tag ranges

This commit is contained in:
Max Brunsfeld 2020-03-20 11:35:27 -07:00
parent a003e5f6bd
commit 59c457c5cf
2 changed files with 3 additions and 3 deletions

View file

@ -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,

View file

@ -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,