-
Notifications
You must be signed in to change notification settings - Fork 106
Open
Description
I propose to define a js_str macro to generate JSONText with and without interpolation as below.
Besides a handy short form a big advantage is that in VSCode JS-Syntax-Highlighting can be achieved by triple-quoting, e.g.
js"""
console.log('This looks pretty!')
"""
Many packages that handle js expressions, e.g. GenieFramework or Electron, would benefit (davidanthoff/Electron.jl#154) (GenieFramework currently exports its own version)
js"""alert("Hello World")"""
# JSONText("alert(\"Hello World\")")Interpolation could be supported via the i flag, such as
js"""alert("1 + 2 == $(1 + 2)")"""i
# JSONText("alert(\"1 + 2 == 3\")")I'll happily file a PR.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels