highlight.js hljs подсветка tests
Оглавление:
echo 'sdafasdf';
echo 'sdafasdf';
echo 'sdafasdf';
echo 'sdafasdf';
HTML, XML
<script type="application/javascript"> function $init() {return true;} </script> <?php namespace Entity; #[MyAttribute] #[\MyExample\MyAttribute] #[MyAttribute(1234)] #[MyAttribute(value: 1234)] #[HTMLAttribute(tag: "h1")] #[MyAttribute(MyAttribute::VALUE)] #[MyAttribute(array("key" => "value"))] #[MyAttribute(100 + 200)] class Foo {} #[MyAttribute(1234), MyAttribute(5678)] class Bar { #[Assert\IsTrue(message: 'The password cannot match your given name')] public function isPasswordSafe() { } #[Assert\AtLeastOneOf([ new Assert\Count(min: 2), new Assert\All( new Assert\GreaterThanOrEqual(7) ), ])] public $stuff; } class Book { #[Assert\Choice( choices: ['blue', 'green'], message: 'Choose a valid color.', )] private $color; #[Assert\Choice(['Hardcover', 'Paperback'])] private $format; #[ Assert\Collection( fields: [ 'authorEmail' => new Assert\Email, 'shortDesc' => [ /*something*/ new Assert\NotBlank, new Assert\Length( max: 200, maxMessage: 'Your short desc is too long' ) ], ], allowMissingFields: true, ) ] protected $additionalData; } ?> <?php /** * @param int $a * @return bool */ function isEven($a) { return ($a % 2) === 0; } /** * TODO: Rely on isEven, but do not highlight bug. * * @param int $a * @return bool */ function isOdd($a) { return ($a % 2) === 1; } ?> <html> </html> <body> <?php # Here echo command is used to print echo "Hello, world!"; ?> </body>
<!DOCTYPE html> <title>Title</title> <style>body {width: 500px;}</style> <script type="application/javascript"> function $init() {return true;} </script> <body> <p checked class="title" id='title'>Title</p> <!-- here goes the rest of the page --> </body>
<!DOCTYPE svg PUBLIC " -//W3C//DTD SVG 1.1 Basic//EN " ' http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd ' > <!DOCTYPE svg PUBLIC"-//W3C//DTD SVG 1.1 Basic//EN"'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd'> <!DOCTYPE note [ <!ENTITY nbsp ' '> <!ENTITY pound '£'> <!ENTITY writer_person " Writer: Donald Duck. "> <!ENTITY copyright "Copyright: Walt Disney Company."> ]> <!ENTITY nbsp ' '> <!ENTITY pound '£'> <!ENTITY writer_person " Writer: Donald Duck. "> <!ENTITY copyright "Copyright: Walt Disney Company."> <!DOCTYPE bookstore [ <!ELEMENT bookstore (book*)> <!ELEMENT book (title,author,genre?)> <!ELEMENT title (#PCDATA)> <!ELEMENT author ( first-name+, last-name+ )+ > <!ELEMENT genre (to,from,header,(message| body))> <!ELEMENT first-name (#PCDATA)> <!ELEMENT last-name (#PCDATA) > <!ATTLIST book price CDATA #REQUIRED> <!ATTLIST book publication_date CDATA> <!ATTLIST book IBSN CDATA> ]> <!ELEMENT bookstore (book*)> <!ELEMENT book (title,author,genre?)> <!ELEMENT title (#PCDATA)> <!ELEMENT author ( first-name+, last-name+ )+ > <!ELEMENT genre (to,from,header,(message| body))> <!ELEMENT first-name (#PCDATA)> <!ELEMENT last-name (#PCDATA) > <!ATTLIST book price CDATA #REQUIRED> <!ATTLIST book publication_date CDATA> <!ATTLIST book IBSN CDATA> <?xml version="1.0" encoding="ISO-8859-1" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"></xs:schema> <s:schema xmlns:s="http://www.w3.org/2001/XMLSchema"></s:schema> <productos> <producto categoría="mueble" descripción="Asiento cómodo para dos o más personas, que tiene respaldo y brazos.">sofá</producto> </productos> <productos> <producto> <name>sofá</name> <categoría>mueble</categoría> <descripción>Asiento cómodo para dos o más personas, que tiene respaldo y brazos.</descripción> </producto> <producto> <name>sillón</name> <categoría>mueble</categoría> <descripción>Silla de brazos, mayor y más cómoda que la ordinaria.</descripción> </producto> </productos> <?xml version="1.0" encoding="ISO-8859-1" ?> <?PITarget PIContent?> <?xml-stylesheet type="text/xsl" href="style.xsl"?> <?xml-stylesheet type="text/css" href="style.css"?> Some <?Pub _font FontColor="green"?>green<?Pub /_font?> text. <?mso-application progid="Excel.Sheet"?> <img src ="/pics/foo.jpg"> <img src= "/pics/foo.jpg"> <img src = "/pics/foo.jpg"> <img src="/pics/foo.jpg"> <img src='/pics/foo.jpg'> <img src=/pics/foo.jpg> <img src=/pics/> <img src=/pics /> <img alt=''/> <img alt/> <img alt=''> <img alt> <script>foo();</script> <script>booger</script> <script>hjk</script>
JSON
[ { "title": "apples", "count": [12000, 20000], "description": {"text": "...", "sensitive": false} }, { "title": "oranges", "count": [17500, null], "description": {"text": "...", "sensitive": false} } ]
js
function $initHighlight(block, cls) { try { if (cls.search(/\bno\-highlight\b/) != -1) return process(block, true, 0x0F) + ` class="${cls}"`; } catch (e) { /* handle exception */ } for (var i = 0 / 2; i < classes.length; i++) { if (checkCondition(classes[i]) === undefined) console.log('undefined'); } return ( <div> <web-component>{block}</web-component> </div> ) } export $initHighlight; `string ${foo + `str${undefined}ing`}`; #!/usr/bin/env node var a = 1; // examples that have proven problematic in the past `Bad ${foo / 1000}` foo = 2 / 2 + 2 / 2; foo = / 2 + 2 /; b = a++ / 2; { key: value, // with comment key2: value, key2clone: value, 'key-3': value, key4: false ? undefined : true, key5: value, /* with a multiline comment */ key6: value, key7: value, /* with a multiline comment */ // another comment key8: value, key9: value, /* with a REAL multiline comment */ key10: value, } 1000000000 // Is this a billion? a hundred millions? Ten millions? 101475938.38 // what scale is this? what power of 10? const FEE = 12300; // is this 12,300? Or 123, because it's in cents? const AMOUNT = 1234500; // is this 1,234,500? Or cents, hence 12,345? Or financial, 4-fixed 123.45? 1_000_000_000 // Ah, so a billion 101_475_938.38 // And this is hundreds of millions let fee = 123_00; // $123 (12300 cents, apparently) let fee = 12_300; // $12,300 (woah, that fee!) let amount = 12345_00; // 12,345 (1234500 cents, apparently) let amount = 123_4500; // 123.45 (4-fixed financial) let amount = 1_234_500; // 1,234,500 0.000001 // 1 millionth 0.000_001 // 1 millionth .000_001 // 1 millionth -.000_001 // 1 millionth 1e10_000 // 10^10000 -- granted, far less useful / in-range... .0, .00, .9, 4.2, 40.0, 0., 10. .0, .0_0, .9, 4.2, 4_0.0, 0., 1_0. .0e10, .00e+10, .9e-10, 4.2E10, 40.0E+08, 0.E-10, 0.e100, 1010e+10 .0e1_0, .0_0e+10, .9e-1_0, 4.2E1_0, 4_0.0E+0_8, 0.E-1_0, 0.e1_0_0, 10_10e+10 let nibbles = 0b1010_0001_1000_0101; let message = 0xA0_B0_C0; let x1 = _52; // This is an identifier, not a numeric literal let x2 = 5_2; // OK (decimal literal) let x7 = 0x5_2; // OK (hexadecimal literal) 0xff 0xdead_beef 0o52 0O52 0xa 0Xa 0XA 0xA 0n 2n 20n 2_0n 2_00n 2_0_0n 20_0n -20_0n 0B1n 0O1n 0X1n // Annex B numeric literals // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals 00, 04, 0777, 08, 008 // expressions containing numeric literals 0..toString, 1e1.toString, fn(.5) // expressions not containing numeric literals x0.e1 // invalid pseudo-numeric expressions 1__0 0b1__0 1e_1 0b1e1 0N 00. // numbers in identifiers const num = $1 const num = $0n9 const num = $abc012 const num = $0x9 const num = $0o0 const num = $09 const num = $9.09 const num = $a9 const num = 1 const num = 0n9 const num = 0x9 const num = 0o0 const num = 09 const num = 9.09 const num = a9 // numbers in identifiers in template strings cosnt string = `${$0}` cosnt string = `${0}` //------ underscore.js ------ export default function (obj) {}; export function each(obj, iterator, context) {}; export { each as forEach }; export function something() {}; //------ main.js ------ import _, { each, something as otherthing } from 'underscore'; const file = import("https://file.io/file.js") x.continue(0); x = [ hljs.COMMENT(/\{%\s*comment\s*%}/, /\{%\s*endcomment\s*%}/), hljs.COMMENT(/\{#/, /#}/), ] function $initHighlight(block, cls) { try { if (cls.search(/\bno\-highlight\b/) != -1) return process(block, true, 0x0F) + ' class=""'; } catch (e) { /* handle exception */ } for (var i = 0 / 2; i < classes.length; i++) { if (checkCondition(classes[i]) === undefined) return /\d+[\s/]/g; } }
TypeScript
class MyClass { public static myValue: string; constructor(init: string) { this.myValue = init; } } import fs = require("fs"); module MyModule { export interface MyInterface extends Other { myProperty: any; } } declare magicNumber number; myArray.forEach(() => { }); // fat arrow syntax
css
@font-face { font-family: Chunkfive; src: url('Chunkfive.otf'); } body, .usertext { color: #F0F0F0; background: #600; font-family: Chunkfive, sans; --heading-1: 30px/32px Helvetica, sans-serif; } @import url(print.css); @media print { a[href^=http]::after { content: attr(href) } }
scss
@import "compass/reset"; // variables $colorGreen: #008000; $colorGreenDark: darken($colorGreen, 10); @mixin container { max-width: 980px; } // mixins with parameters @mixin button($color:green) { @if ($color == green) { background-color: #008000; } @else if ($color == red) { background-color: #B22222; } } button { @include button(red); } div, .navbar, #header, input[type="input"] { font-family: "Helvetica Neue", Arial, sans-serif; width: auto; margin: 0 auto; display: block; } .row-12 > [class*="spans"] { border-left: 1px solid #B5C583; } // nested definitions ul { width: 100%; padding: { left: 5px; right: 5px; } li { float: left; margin-right: 10px; .home { background: url('http://placehold.it/20') scroll no-repeat 0 0; } } } .banner { @extend .container; } a { color: $colorGreen; &:hover { color: $colorGreenDark; } &:visited { color: #c458cb; } } @for $i from 1 through 5 { .span#{$i} { width: 20px*$i; } } @mixin mobile { @media screen and (max-width : 600px) { @content; } }
Less
@import "fruits"; @rhythm: 1.5em; @media screen and (min-resolution: 2dppx) { body {font-size: 125%} } section > .foo + #bar:hover [href*="less"] { margin: @rhythm 0 0 @rhythm; padding: calc(5% + 20px); background: #f00ba7 url(http://placehold.alpha-centauri/42.png) no-repeat; background-image: linear-gradient(-135deg, wheat, fuchsia) !important ; background-blend-mode: multiply; } @font-face { font-family: /* ? */ 'Omega'; src: url('../fonts/omega-webfont.woff?v=2.0.2'); } .icon-baz::before { display: inline-block; font-family: "Omega", Alpha, sans-serif; content: "\f085"; color: rgba(98, 76 /* or 54 */, 231, .75); }
php
<?php previous_post_link('%link', '%title', false, '15'); ?>
HL Bugs with closure and use:
add_filter( 'template_include', function ( $templates ) use ( $ctp_object ) { // Задаём шаблон одиночной записи. if ( ! empty( $ctp_object->template_item ) && is_singular( $ctp_object->name ) ) { $templates = locate_template( $ctp_object->template_item ); } // Задаём шаблон архиву записей. if ( ! empty( $ctp_object->template_archive ) && is_post_type_archive( $ctp_object->name ) ) { $templates = locate_template( $ctp_object->template_archive ); } return $templates; } );
hljs.COMMENT( '//', '$', { contains: [ PREPROCESSOR ] } ),
// comment <?php ?>
attributes.txt
namespace Entity; #[MyAttribute] #[\MyExample\MyAttribute] #[MyAttribute(1234)] #[MyAttribute(value: 1234)] #[HTMLAttribute(tag: "h1")] #[MyAttribute(MyAttribute::VALUE)] #[MyAttribute(array("key" => "value"))] #[MyAttribute(100 + 200)] class Foo {} #[MyAttribute(1234), MyAttribute(5678)] class Bar { #[Assert\IsTrue(message: 'The password cannot match your given name')] public function isPasswordSafe() { } #[Assert\AtLeastOneOf([ new Assert\Count(min: 2), new Assert\All( new Assert\GreaterThanOrEqual(7) ), ])] public $stuff; } class Book { #[Assert\Choice( choices: ['blue', 'green'], message: 'Choose a valid color.', )] private $color; #[Assert\Choice(['Hardcover', 'Paperback'])] private $format; #[ Assert\Collection( fields: [ 'authorEmail' => new Assert\Email, 'shortDesc' => [ /*something*/ new Assert\NotBlank, new Assert\Length( max: 200, maxMessage: 'Your short desc is too long' ) ], ], allowMissingFields: true, ) ] protected $additionalData; }
case.txt
$test = true $test = TRUE $a = false $a = FALSE $b = null $b = NULL
comments.txt
/** * @param int $a * @return bool */ function isEven($a) { return ($a % 2) === 0; } /** * TODO: Rely on isEven, but do not highlight bug. * * @param int $a * @return bool */ function isOdd($a) { return ($a % 2) === 1; }
namespace.txt
namespace Location\Web; namespace foo; use My\Full\Classname as Another; use My\Full\NSname; use ArrayObject; use function My\Full\functionName; use function My\Full\functionName as func; use const My\Full\CONSTANT; use Example\{ClassA, ClassB, ClassC as C};
numbers.txt
$decimal = 12398; $binary = 0b10101; $binary_alt = 0B1001_0000_1111; $hex = 0x12AF; $hex_alt = 0X12_AF; $oct = 0o1234567; $oct_alt = 0O12_34_56_7; $oct_alt2 = 0777_555; $sci = 1.2e3; $sci2 = 7E-10;
php80.txt
match ($key) { 1 => 'Integer 1', '1' => 'String 1', true => 'Bool true', [] => 'Empty array', [1] => 'Array [1]', }; enum Foo: string { case Test = 'test'; }
functions.txt
/** * Arrow functions */ $fn1 = fn($x) => $x + $y; $fn2 = function ($x) use ($y) { return $x + $y; }; /** * Function invoke */ $date = new DateTimeImmutable (); $date->format('Y-m-d'); DateTimeImmutable::createFromMutable(new \DateTime('now')); str_contains (\strtoupper(substr('abcdef', -2), 'f')); /** * Function declaration */ function testMe(string|int $name): int { if (empty($name)) { return 0; } elseif ($name === 1) { return (int) $name; } switch($name) { case '2': return 2; default: throw new \Exception('error'); } } /** * First-class Callable Syntax */ $fun = mb_strlen(); $fun(); /** * Named arguments */ setAlarm( label: 'foo', time:time() + array(5)[0] + Foo::HOUR, ); /** * Comments inside function declaration */ function foo( // line comment $foo, /* block comment */ $bar = 'str//foo', # hash comment $yoo = 123 ){ return ''; } /** * Comments inside function invoke */ foo( 'string', [ # hash comment // line comment /* block comment */ ] );
strings.txt
// variable substitution echo ('Hello {$person->name}! Welcome to $company!'); echo ("Hello {$person->name}! Welcome to $company!"); echo (<<<EOT Hello {$person->name}! Welcome to $company! EOT); echo (<<<MSG Hello {$person->name}! Welcome to $company! MSG); // heredoc syntax var_dump(<<<SQL SELECT * FROM table SQL); var_dump(<<<SQL SELECT * FROM table SQL); // nowdoc syntax <<<'HTML' Hello {$person->name}! Welcome to $company! HTML;
titles.txt
final class Example extends Foo { const FOO='foo'; public function __construct( public readonly string $name = self::FOO ) {} public function getClass(): string { return DateTimeImmutable::class; } public function getClassFromSelf(): string { return self::class; } public static function getClassFromStatic(): string { return static::class; } public static function getParentClass(): string { return parent::class; } } $date = DateTimeImmutable::createFromMutable(new \DateTime()); echo $date::class;
php_light
require_once 'Zend/Uri/Http.php'; namespace Location\Web; $heredoc = <<<TEXT text $var TEXT; $heredoc = <<<'TEXT' text $var TEXT; return $this; $this->foo = 'bar'; add_filter( "{$type->foo}_template_hierarchy", function( $templates ) use ( $type ){ $prefix = 'templates'; } interface Factory { static function _factory(); } abstract class URI extends BaseURI implements Factory { abstract function test(); public static $st1 = 1; const ME = "Yo"; var $list = NULL; private $var; /** * Returns a URI * * @return URI */ static public function _factory($stats = array(), $uri = 'http') { echo __METHOD__; $uri = explode(':', $uri, 0b10); $schemeSpecific = isset($uri[1]) ? $uri[1] : ''; $desc = 'Multi line description'; // Security check if (!ctype_alnum($scheme)) { throw new Zend_Uri_Exception('Illegal scheme'); } $this->var = 0 - self::$st; $this->list = list(Array("1"=> 2, 2=>self::ME, 3 => \Location\Web\URI::class)); return [ 'uri' => $uri, 'value' => null, ]; } } match ($key) { 1 => 'Integer 1', '1' => 'String 1', true => 'Bool true', [] => 'Empty array', [1] => 'Array [1]', }; enum Foo: string { case Test = 'test'; } match ($key) { 1 => 'Integer 1', '1' => 'String 1', true => 'Bool true', [] => 'Empty array', [1] => 'Array [1]', }; echo URI::ME . URI::$st1; __halt_compiler () ; datahere datahere datahere */ datahere
SQL
CREATE TABLE "topic" ( "id" integer NOT NULL PRIMARY KEY, "forum_id" integer NOT NULL, "subject" varchar(255) NOT NULL ); ALTER TABLE "topic" ADD CONSTRAINT forum_id FOREIGN KEY ("forum_id") REFERENCES "forum" ("id"); -- Initials insert into "topic" ("forum_id", "subject") values (2, 'D''artagnian');
Python
@requires_authorization(roles=["ADMIN"]) def somefunc(param1='', param2=0): r'''A docstring''' if param1 > param2: # interesting print 'Gre\'ater' return (param2 - param1 + 1 + 0b10l) or None class SomeClass: pass >>> message = '''interpreter ... prompt'''
Markdown
# hello world you can write text [with links](http://example.com) inline or [link references][1]. * one _thing_ has *em*phasis * two __things__ are **bold** [1]: http://example.com --- hello world =========== <this_is inline="xml"></this_is> # hello world ## hello world hello world =========== *hello world* or [google](link) =========== # *hello world* or [google](link) > markdown is so cool so are code segments 1. one thing (yeah!) 2. two thing `i can write code`, and `more` wipee! _Italic_ *Italic* __Bold__ **Bold** *Is __Combined__* __Bold *then italic*__ **Bold _then italic_** **Bold and <br/>** **_[this](https://google.com)_** > quoted **Bold _then italic_** > _[this](https://google.com)_ *this is a emphasized paragraph* *this is too* * list with a *italic item* * list with a **bold item** ***This is bold and italic*** ___This is bold and italic___ ** i shouldn't be italic** * and I shouldn't be italic either* __ not really bold__ _ not italic_ > * One (this point is italic) > * Two > * Three ![](https://example.com) [](https://example.com) ![alt](https://example.com) [text](https://example.com) - this is a list - this is another - nested list - another nested * nested alternative
Apache
# BEGIN SAPE ARTICLES <IfModule mod_rewrite.c> RewriteEngine On #Article images rules RewriteCond %{ENV:REDIRECT_STATUS} ^$ RewriteRule ^id\-([0-9]+)/[a-z0-9\_\-]+\.(jpg|gif|png)$ /3f2962bb296175680a158681692b9056.php [L] #Articles rules RewriteCond %{ENV:REDIRECT_STATUS} ^$ RewriteRule ^id\-([0-9]+)/([a-z0-9\_\-]+)$ /3f2962bb296175680a158681692b9056.php [L] </IfModule> # END SAPE ARTICLES # BEGIN OTHER REDIRECTS <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^stat/(.*)$ https://stat.wp-kama.dev/$1 [R=301,L] RewriteCond %{REQUEST_URI} asterios_rb_stats.php [OR] RewriteCond %{REQUEST_URI} ^/LA/rb RewriteRule (.*) https://tools.wp-kama.dev/LA/asterios-RB.php [R=301,L] </IfModule> # END OTHER REDIRECTS # BEGIN WordPress # Директивы (строки) между `BEGIN WordPress` и `END WordPress` # созданы автоматически и подлежат изменению только через фильтры WordPress. # Сделанные вручную изменения между этими маркерами будут перезаписаны. <IfModule mod_rewrite.c> RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
Nginx
#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; include "C:/laragon/etc/nginx/php_upstream.conf"; include "C:/laragon/etc/nginx/sites-enabled/*.conf"; client_max_body_size 2000M; server_names_hash_bucket_size 64; }
Bash
#!/bin/bash ###### CONFIG ACCEPTED_HOSTS="/root/.hag_accepted.conf" BE_VERBOSE=false if [ "$UID" -ne 0 ] then echo "Superuser rights required" exit 2 fi genApacheConf(){ echo -e "# Host ${HOME_DIR}$1/$2 :" } echo '"quoted"' | tr -d \" > text.txt ### arithmetic.txt echo $(( 16#deadbeef / 1003 )) yumi=deadbeef echo $(( 16#$yumi / 1003 )) B=20 yumi=deadbeef echo $(( $B#$yumi / 1003 )) # test that << within an expression doesn't false positively as a heredoc... (( 19 << 42 )) printf 'Line 1\n' printf 'Line 2\n' fubar=42 (( x = 19 * fubar / 2 )) ### escaped-quote.txt # Escaped double-quote is not a string echo '"quoted"' | tr -d \" > text.txt # numbers aren't highlighted in bash as their semantics is # not strictly defined for command line parameters $ tail -10 access.log ### strings.txt SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" TLS_DIR="$SCRIPT_DIR/../src/main/resources/tls" ROOT_DIR="$SCRIPT_DIR/.." jshell -s - << EOF System.out.printf("Procs: %s%n", getdata()) EOF jshell -s - <<<'System.out.printf("Procs: %s%n", getdata())' cat <<< '$VARIABLE' cat <<< "$VARIABLE" cat <<< $VARIABLE cat <<< `$VARIABLE` ### token-containing-keyword.txt # a keyword as part of an option mycmd --disable-foo # a keyword as part of a parameter some-cmd set-some-setting some-cmd set_some_setting # a keyword as part of command check-case foo check_case foo ### variables.txt $A ${B} ${WURST:-${CARNE}}
Yaml
--- # comment string_1: "Bar" string_2: 'bar' string_3: bar inline_keys_ignored: sompath/name/file.jpg keywords_in_yaml: - true - false - TRUE - FALSE - 21 - 21.0 - !!str 123 "quoted_key": &foobar bar: foo foo: "foo": bar reference: *foobar multiline_1: | Multiline String multiline_2: > Multiline String multiline_3: " Multiline string " ansible_variables: "foo {{variable}}" array_nested: - a - b: 1 c: 2 - b - comment