Skip to content

Commit d991ec8

Browse files
committed
Change ordering of Lua filter to post-quarto
This fixes #12 *and* fixes the constant warnings about cross-references like @fig-whatever not being found. The counting filter was previously set to pre-quarto, which was before cross references were parsed, so it was causing weird behavior.
1 parent 98fe3d0 commit d991ec8

File tree

10 files changed

+9934
-21
lines changed

10 files changed

+9934
-21
lines changed

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
# Quarto word count
44

5-
65
- [Experimental new feature!](#experimental-new-feature)
76
- [Why counting words is hard](#why-counting-words-is-hard)
87
- [Using the word count script](#using-the-word-count-script)
@@ -186,16 +185,16 @@ format:
186185
html: # Regular built-in format
187186
citeproc: false
188187
filters:
189-
- at: pre-quarto
188+
- at: post-quarto
190189
path: _extensions/andrewheiss/wordcount/citeproc.lua
191-
- at: pre-quarto
190+
- at: post-quarto
192191
path: _extensions/andrewheiss/wordcount/wordcount.lua
193192
jss-pdf: # Custom third-party format
194193
citeproc: false
195194
filters:
196-
- at: pre-quarto
195+
- at: post-quarto
197196
path: _extensions/andrewheiss/wordcount/citeproc.lua
198-
- at: pre-quarto
197+
- at: post-quarto
199198
path: _extensions/andrewheiss/wordcount/wordcount.lua
200199
```
201200

@@ -486,9 +485,9 @@ format:
486485
html:
487486
citeproc: false
488487
filters:
489-
- at: pre-quarto
488+
- at: post-quarto
490489
path: "path/to/citeproc.lua"
491-
- at: pre-quarto
490+
- at: post-quarto
492491
path: "path/to/wordcount.lua"
493492
```
494493

README.qmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,16 @@ format:
123123
html: # Regular built-in format
124124
citeproc: false
125125
filters:
126-
- at: pre-quarto
126+
- at: post-quarto
127127
path: _extensions/andrewheiss/wordcount/citeproc.lua
128-
- at: pre-quarto
128+
- at: post-quarto
129129
path: _extensions/andrewheiss/wordcount/wordcount.lua
130130
jss-pdf: # Custom third-party format
131131
citeproc: false
132132
filters:
133-
- at: pre-quarto
133+
- at: post-quarto
134134
path: _extensions/andrewheiss/wordcount/citeproc.lua
135-
- at: pre-quarto
135+
- at: post-quarto
136136
path: _extensions/andrewheiss/wordcount/wordcount.lua
137137
```
138138

@@ -361,9 +361,9 @@ format:
361361
html:
362362
citeproc: false
363363
filters:
364-
- at: pre-quarto
364+
- at: post-quarto
365365
path: "path/to/citeproc.lua"
366-
- at: pre-quarto
366+
- at: post-quarto
367367
path: "path/to/wordcount.lua"
368368
```
369369

_extensions/wordcount/_extension.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ authors:
44
orcid: 0000-0003-1866-860X
55
- name: Justin Landis
66
orcid: 0000-0001-5501-4934
7-
version: 1.6.2
7+
version: 1.7.0
88
quarto-required: ">=1.4.551"
99
contributes:
1010
shortcodes:
1111
- "words.lua"
1212
format:
1313
common:
1414
filters:
15-
- at: pre-quarto
15+
- at: post-quarto
1616
path: citeproc.lua
17-
- at: pre-quarto
17+
- at: post-quarto
1818
path: wordcount.lua
1919
citeproc: false
2020
html: default

template.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ format: wordcount-html
1010
# format:
1111
# html:
1212
# filters:
13-
# - at: pre-quarto
13+
# - at: post-quarto
1414
# path: path/to/citeproc.lua
15-
# - at: pre-quarto
15+
# - at: post-quarto
1616
# path: path/to/wordcount.lua
1717
# citeproc: false
1818

0 commit comments

Comments
 (0)