From 89e3728ec86197986c0038c5da41ce6f631623b4 Mon Sep 17 00:00:00 2001 From: Adam Hollett Date: Mon, 11 Apr 2016 08:57:20 -0400 Subject: [PATCH] Add code labels for abs filter --- filters/abs.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/filters/abs.md b/filters/abs.md index c151423..c35489c 100644 --- a/filters/abs.md +++ b/filters/abs.md @@ -4,34 +4,40 @@ title: abs Returns the absolute value of a number. +

Input

```liquid {% raw %} {{ -17 | abs }} {% endraw %} ``` +

Output

```text 17 ``` +

Input

```liquid {% raw %} {{ 4 | abs }} {% endraw %} ``` +

Output

```text 4 ``` `abs` will also work on a string if the string only contains a number. +

Input

```liquid {% raw %} {{ "-19.86" | abs }} {% endraw %} ``` +

Output

```text 19.86 ```