Skip to content

Outdated version

You are viewing the outdated version of Textwire. Switch to the latest version to get all the new features and improvements

Other Information ​

Trailing Commas ​

You can use trailing commas in arrays, objects, and function arguments. Example:

textwire
{{ names = ["John", "Jane", "Jack",] }}
{{ person = { "name": "John", "age": 25, } }}

@insert (
    "title",
    "Home page",
)

Comments ​

You can use comments in Textwire to write notes or to comment out code. Example:

textwire
{{-- This is a Textwire comment --}}
<!-- This is an HTML comment -->

{{ x = 5; x }}

HTML comment will be displayed in the final HTML output, but Textwire comment will be removed from the final HTML output. It might be useful when you want to comment out some code that you don't want to be displayed in the final HTML output.