---
title: comment
description: "Wrap text in comment markers."
---

# comment

Wrap text in comment markers.

## Syntax

```knap
{{ value | comment }}
```

## Usage

- Multiline comments put the opening and closing `%%` markers on separate lines.
- Leading and trailing whitespace stays outside inline markers.
- For arrays and objects, including serialized collections from another filter, string values are formatted recursively while keys and non-string values are preserved.

## Example

```json title="Data"
{
  "note": "Hidden note"
}
```

```knap title="Template"
{{ note | comment }}
```

```md title="Output"
%%Hidden note%%
```
