Curvea

CurveaScript

Raw Code Blocks

CurveaScript includes @code support for outputting escaped code examples.

This is useful for documentation websites where code should be displayed instead of executed as template syntax.

Block syntax

@code
@page

<h1>{{ page.title }}</h1>
@endcode

The content inside the block is escaped and protected during rendering.

Inline expression syntax

The current resolver also supports:

@code page.content

This resolves the expression and outputs the value as escaped raw code.

Why raw code exists

Without raw code protection, examples containing {{ }} or CurveaScript directives could be interpreted by the renderer.

@code lets docs safely show CurveaScript syntax.

Closing rule

Block @code must close with:

@endcode

If no closing @endcode exists, the parser or resolver throws an error.