docs: document string interpolation syntax and update code examples across docs and site
Add a new "Interpolation" section to the values documentation explaining the `%(expr)` syntax with examples of complex expressions and nested interpolation. Update all code samples in README.md, getting-started.markdown, and index.markdown to use the new interpolation syntax instead of string concatenation. Adjust syntax highlighting in style.scss by adding a new `.si` class for interpolation spans with distinct background color, and tweak existing color values for strings, numbers, and keywords to improve visual distinction. Add the `\%` escape sequence to the list of supported escape characters in values.markdown.
This commit is contained in:
@@ -10,7 +10,7 @@ a familiar, modern [syntax][].
|
||||
|
||||
class Wren {
|
||||
flyTo(city) {
|
||||
System.print("Flying to " + city)
|
||||
System.print("Flying to %(city)")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user