Skip to content

Commit

Permalink
Fix #4195 bib watcher follows latex.watch.files.ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Yu committed Mar 11, 2024
1 parent 2f27c56 commit 5c4bfa0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,9 @@ function updateBibfiles(fileCache: FileCache) {
for (const bib of bibs) {
const bibPaths = lw.file.getBibPath(bib, path.dirname(fileCache.filePath))
for (const bibPath of bibPaths) {
if (isExcluded(bibPath)) {
continue
}
fileCache.bibfiles.add(bibPath)
logger.log(`Bib ${bibPath} from ${fileCache.filePath} .`)
if (!lw.watcher.bib.has(bibPath)) {
Expand Down Expand Up @@ -543,6 +546,9 @@ function parseAuxFile(filePath: string, srcDir: string) {
for (const bib of bibs) {
const bibPaths = lw.file.getBibPath(bib, srcDir)
for (const bibPath of bibPaths) {
if (isExcluded(bibPath)) {
continue
}
if (lw.root.file.path && !get(lw.root.file.path)?.bibfiles.has(bibPath)) {
get(lw.root.file.path)?.bibfiles.add(bibPath)
logger.log(`Found .bib ${bibPath} from .aux ${filePath} .`)
Expand Down

0 comments on commit 5c4bfa0

Please sign in to comment.