Skip to content

Commit

Permalink
Allow @ inside double braces
Browse files Browse the repository at this point in the history
  • Loading branch information
josephaltmaier committed Sep 3, 2021
1 parent 1aab885 commit b8612ca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/prettybib/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"os"

"github.com/BurntSushi/toml"
"github.com/nickng/bibtex"
"github.com/josephaltmaier/bibtex"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/nickng/bibtex
module github.com/josephaltmaier/bibtex

go 1.13

Expand Down
3 changes: 3 additions & 0 deletions scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ func (s *scanner) scanBraced() (token, string) {
} else if ch == '@' {
if macro {
_, _ = buf.WriteRune(ch)
} else if brace == 2 {
// @ should be allowed inside double braces
_, _ = buf.WriteRune(ch)
} else {
log.Fatalf("%s: %s", ErrUnexpectedAtsign, buf.String())
}
Expand Down

0 comments on commit b8612ca

Please sign in to comment.