Skip to content

Commit 4a4c269

Browse files
Dale-Blackclaude
andcommitted
Fix docstring interpolation error in packages.jl
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 07800ee commit 4a4c269

1 file changed

Lines changed: 2 additions & 15 deletions

File tree

src/compiler/packages.jl

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,8 @@ const PACKAGE_COMPILATIONS = Dict{Tuple{Module, Symbol}, Function}()
2121
2222
Register a JS compilation mapping for a Julia package function.
2323
24-
The `compiler_fn` receives:
25-
- `ctx::JSCompilationContext` — compilation context
26-
- `kwargs::Dict{Symbol, String}` — keyword arguments (name → compiled JS expression)
27-
- `pos_args::Vector{String}` — positional arguments (compiled JS expressions)
28-
29-
And should return a JS code string.
30-
31-
# Example
32-
```julia
33-
register_package_compilation!(MyPlotLib, :scatter) do ctx, kwargs, pos_args
34-
pairs = ["\\"\\$(k)\\": \\$(v)" for (k, v) in kwargs]
35-
push!(pairs, "\\"type\\": \\"scatter\\"")
36-
return "{\\$(join(pairs, ", "))}"
37-
end
38-
```
24+
The compiler_fn receives (ctx, kwargs::Dict{Symbol,String}, pos_args::Vector{String})
25+
and should return a JS code string.
3926
"""
4027
function register_package_compilation!(compiler_fn::Function, mod::Module, name::Symbol)
4128
PACKAGE_COMPILATIONS[(mod, name)] = compiler_fn

0 commit comments

Comments
 (0)