Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error adding css vars block Error: Can't handle character: "÷" #11645

Open
LucyMcGowan opened this issue Dec 9, 2024 · 7 comments
Open

Error adding css vars block Error: Can't handle character: "÷" #11645

LucyMcGowan opened this issue Dec 9, 2024 · 7 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@LucyMcGowan
Copy link

Bug description

Similar to #11148, I am seeing the following:

Error adding css vars block Error: Can't handle character: "÷" (12999:13)
at InputStream.err (file:///Applications/quarto/bin/quarto.js:48871:15)
at Object.err (file:///Applications/quarto/bin/quarto.js:48890:23)
at TokenStream.err (file:///Applications/quarto/bin/quarto.js:48960:27)
at TokenStream.read_next (file:///Applications/quarto/bin/quarto.js:48996:14)
at TokenStream.peek (file:///Applications/quarto/bin/quarto.js:48946:32)
at Object.peek (file:///Applications/quarto/bin/quarto.js:49118:22)
at file:///Applications/quarto/bin/quarto.js:49153:36
at Array.reduce ()
at Parser.is_type (file:///Applications/quarto/bin/quarto.js:49152:23)
at Parser.is_punctuation (file:///Applications/quarto/bin/quarto.js:49164:21)
The resulting CSS file will not have SCSS color variables exported as CSS.
This is likely a Quarto bug.

// quarto-scss-analysis-annotation { "quarto-version": "1.6.39" }

// quarto-scss-analysis-annotation { "origin": "'use' section from format" }

Steps to reproduce

No response

Expected behavior

No response

Actual behavior

No response

Your environment

No response

Quarto check output

Quarto 1.6.39
[✓] Checking environment information...
Quarto cache location: /Users/lucymcgowan/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.4.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.46.3: OK
Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.6.39
Path: /Applications/quarto/bin

[✓] Checking tools....................OK
TinyTeX: v2024.01
Chromium: (not installed)

[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/lucymcgowan/Library/TinyTeX/bin/universal-darwin
Version: 2024

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
Version: 3.12.4
Path: /opt/homebrew/opt/[email protected]/bin/python3.12
Jupyter: (None)

  Jupyter is not available in this Python installation.
  Install with python3 -m pip install jupyter

[✓] Checking R installation...........OK
Version: 4.3.2
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
knitr: 1.45
rmarkdown: 2.25

[✓] Checking Knitr engine render......OK

@LucyMcGowan LucyMcGowan added the bug Something isn't working label Dec 9, 2024
@cscheid
Copy link
Collaborator

cscheid commented Dec 9, 2024

Thanks for the report! Can we get a reprex (where are you using ÷ specifically?)

@cscheid cscheid added the needs-repro Issues that are blocked until reporter provides an adequate reproduction label Dec 9, 2024
@LucyMcGowan
Copy link
Author

I’m not knowingly using it 🫣

@LucyMcGowan
Copy link
Author

LucyMcGowan commented Dec 9, 2024

Oh boy, just found it, it was an accident, sorry!! Thank you for the quick reply

(For reference it was in my SCSS file but it didn’t mean to be, I had a color with the character accidentally inserted somehow, probably from typing with a baby in my lap 😂)

@cscheid cscheid reopened this Dec 9, 2024
@cscheid
Copy link
Collaborator

cscheid commented Dec 9, 2024

@LucyMcGowan Sorry, I should have clarified! This is clearly a bug in Quarto, but it helps us to fix if we know what causes it. Do you have a link to a GitHub repo, eg?

@LucyMcGowan
Copy link
Author

My scss file had this:

#user-info {
font-size: .8em;
font-weight: bold;
color: #343÷;
}

(but it was a typo!)

@cscheid
Copy link
Collaborator

cscheid commented Dec 9, 2024

Thank you. The crash is coming from a third-party library that we know is fairly sketchy (but we don't have the resources to rewrite ourselves just yet), and so we're collecting an increasing number of workarounds. This will fit right in.

@cscheid
Copy link
Collaborator

cscheid commented Dec 9, 2024

Ok, it turns out that in this case it isn't a bug. For these special characters to be allowed, the value should be in quotes. We should still offer a better error message in this case.

@cscheid cscheid added enhancement New feature or request and removed needs-repro Issues that are blocked until reporter provides an adequate reproduction bug Something isn't working labels Dec 9, 2024
@cscheid cscheid self-assigned this Dec 9, 2024
@cscheid cscheid added this to the Future milestone Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants