quarto-ext / fontawesome

Use Font Awesome icons in HTML and PDF documents.
https://quarto-ext.github.io/fontawesome/
MIT License
109 stars 10 forks source link

fontawesome not working with Quarto 0.9.644 #14

Closed Alaburda closed 2 years ago

Alaburda commented 2 years ago

Hi! Not sure whether to report as an issue or not but the fontawesome extension doesn't work with Quarto version 0.9.644 (and possibly any version <1.0?).

Steps to reproduce:

  1. Create website with quarto create-project mysite --type website
  2. Install fontawesome extension in the mysite folder with quarto install extension quarto-ext/fontawesome
  3. Edit index.qmd and add line {{< fa lemon >}}
  4. Run quarto preview mysite

The following returns this error: Error running filter C:/Users/Paulius/AppData/Local/Programs/Quarto/share/filters/quarto-pre/quarto-pre.lua: [string "---------------------------------------------..."]:1477: attempt to index a string value (local 'v') stack traceback: [string "---------------------------------------------..."]:1589: in field 'addHtmlDependency' ...ysite_extensions\quarto-ext\fontawesome\fontawesome.lua:6: in upvalue 'ensureHtmlDeps' ...ysite_extensions\quarto-ext\fontawesome\fontawesome.lua:57: in field 'handle' .../Programs/Quarto/share/filters/quarto-pre/quarto-pre.lua:2906: in function 'callShortcodeHandler' .../Programs/Quarto/share/filters/quarto-pre/quarto-pre.lua:2843: in function 'transformShortcodeBlocks'

Updating Quarto to latest resolved the issue. Perhaps a solution could be adding a version dependency that throws a prompt to update Quarto?

cscheid commented 2 years ago

We don't presently have a way to check for versions in an extension, but that's an excellent idea. I'm going to transfer this to an issue on quarto itself. Thanks!

cscheid commented 2 years ago

https://github.com/quarto-dev/quarto-cli/issues/1681