Skip to content

Commit

Permalink
Merge pull request universal-ctags#3824 from masatake/bibtx--dots-in-…
Browse files Browse the repository at this point in the history
…labels

BibTeX: accept "." and "/" as parts of a bib entry
  • Loading branch information
masatake authored Sep 18, 2023
2 parents 3c5acac + 8a7eaae commit 07250eb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions Units/parser-bibtex.r/bib-simple.d/expected.tags
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ john_doe input.bib /^@string{john_doe = "Prof. Dr. John Doe"}$/;" s language:Bib
xx_thoughts input.bib /^@unpublished{xx_thoughts,$/;" u language:BibTeX
hicks:2001 input.bib /^@Book{hicks:2001,$/;" b language:BibTeX
knuthwebsite input.bib /^@online{knuthwebsite,$/;" V language:BibLaTeX
10.1145/605432.605407 input.bib /^@Article{10.1145\/605432.605407,$/;" a language:BibTeX
7 changes: 7 additions & 0 deletions Units/parser-bibtex.r/bib-simple.d/input.bib
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,10 @@ @online{knuthwebsite
url = "http://www-cs-faculty.stanford.edu/~uno/abcde.html",
keywords = "latex,knuth"
}

@Comment Taken from https://github.com/universal-ctags/ctags/issues/3802#issuecomment-1723511773
@Comment submitted by @andregpss (André Silva)
@Article{10.1145/605432.605407,
author = {Levis, Philip and Culler, David},
title = {Mat'{e}: A Tiny Virtual Machine for Sensor Networks},
year = {2002} }
2 changes: 1 addition & 1 deletion parsers/bibtex.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#define isType(token,t) (bool) ((token)->type == (t))
#define isKeyword(token,k) (bool) ((token)->keyword == (k))
#define isIdentChar(c) \
(isalpha (c) || isdigit (c) || (c) == '_' || (c) == '-' || (c) == '+' || (c) == ':')
(isalpha (c) || isdigit (c) || (c) == '_' || (c) == '-' || (c) == '+' || (c) == ':' || (c) == '.' || (c) == '/')

/*
* DATA DECLARATIONS
Expand Down

0 comments on commit 07250eb

Please sign in to comment.