Skip to content

Commit

Permalink
make comments use percentage signs
Browse files Browse the repository at this point in the history
  • Loading branch information
pfandzelter committed Jan 25, 2023
1 parent 988f36f commit 47ac012
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions bibclean.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@ func main() {
check(err)

if usebbl {
fmt.Fprintf(&buf, "// --------------------\n// --- %s ---\n// --------------------\n\n", "USED ENTRIES")
fmt.Fprintf(&buf, "%% --------------------\n%% --- %s ---\n%% --------------------\n\n", "USED ENTRIES")

for _, t := range types {

fmt.Fprintf(&buf, "// --- %s ---\n\n", strings.ToUpper(t))
fmt.Fprintf(&buf, "%% --- %s ---\n\n", strings.ToUpper(t))

for _, element := range elements {
// just noticing that this is terribly inefficient
Expand All @@ -203,12 +203,12 @@ func main() {
}
}

fmt.Fprintf(&buf, "// ----------------------\n// --- %s ---\n// ----------------------\n\n", "UNUSED ENTRIES")
fmt.Fprintf(&buf, "%% ----------------------\n%% --- %s ---\n%% ----------------------\n\n", "UNUSED ENTRIES")
}

for _, t := range types {

fmt.Fprintf(&buf, "// --- %s ---\n\n", strings.ToUpper(t))
fmt.Fprintf(&buf, "%% --- %s ---\n\n", strings.ToUpper(t))

for _, element := range elements {
if element.Type == t {
Expand Down
2 changes: 1 addition & 1 deletion pkg/bibtex/bibtex.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (element *Element) String() string {
for key, tag := range element.Tags {
// add the keys that we don't need as comments
if _, ok := neededKeys[key]; !ok {
out = append(out, fmt.Sprintf("// %s: %s", key, tag))
out = append(out, fmt.Sprintf("%% %s: %s", key, tag))
}
}

Expand Down

0 comments on commit 47ac012

Please sign in to comment.