feat: replace all :::dart code fence markers with :::wren in documentation
Add a custom Pygments lexer plug-in for Wren syntax highlighting, update contributing docs with setup instructions for the lexer, and switch every `:::dart` annotation across all doc/site markdown files to `:::wren` so code examples render with the correct language grammar.
This commit is contained in:
@@ -11,7 +11,7 @@ function, so this really just returns the argument. It exists mainly to let you
|
||||
create a "bare" function when you don't want to immediately pass it as a [block
|
||||
argument](../functions.html#block-arguments) to some other method.
|
||||
|
||||
:::dart
|
||||
:::wren
|
||||
var fn = Fn.new {
|
||||
System.print("The body")
|
||||
}
|
||||
@@ -24,7 +24,7 @@ It is a runtime error if `function` is not a function.
|
||||
|
||||
The number of arguments the function requires.
|
||||
|
||||
:::dart
|
||||
:::wren
|
||||
System.print(Fn.new {}.arity) // 0.
|
||||
System.print(Fn.new {|a, b, c| a }.arity) // 3.
|
||||
|
||||
@@ -32,7 +32,7 @@ The number of arguments the function requires.
|
||||
|
||||
Invokes the function with the given arguments.
|
||||
|
||||
:::dart
|
||||
:::wren
|
||||
var fn = Fn.new { |arg|
|
||||
System.print(arg)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user