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

contentRule (`text "foo") #263

Closed
davesnx opened this issue Jan 18, 2023 · 3 comments
Closed

contentRule (`text "foo") #263

davesnx opened this issue Jan 18, 2023 · 3 comments

Comments

@davesnx
Copy link
Collaborator

davesnx commented Jan 18, 2023

Hi,

contentRule (``text "•") it yields at runtime:

Uncaught Error:
You seem to be using a value for 'content' without quotes, try replacing it with `content: '"•"'`

This happens since it transforms to content: "" in JavaScript instead of content: '""'. Would make sense to have string_of_content to add quotes? (Maybe add quotes when missing?)

@davesnx
Copy link
Collaborator Author

davesnx commented Jan 18, 2023

For anyone reading, the fix is to add quotes:

ReasonML
contentRule(`text({js|" "|js}));

OCaml
contentRule (`text {js|" "|js});

ReScript
contentRule(#text(`" "`);

@giraud
Copy link
Owner

giraud commented Jan 20, 2023

it used to be working 😕 something changed

@giraud
Copy link
Owner

giraud commented Oct 17, 2023

adding quotes if missing (text not starting with ' or ")

@giraud giraud closed this as completed Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants