| Bytes | Lang | Time | Link |
|---|---|---|---|
| 338 | Python | 250924T154726Z | ojdo |
Python, 338 bytes
from textwrap import*
s,I,C,S,N='YAML:\nIt\'s "kek".',indent,':',' ','\n'
t=s.replace(C,C+N)
print('\n'.join(map(lambda x:'-'+I(x,S),[s.replace(C,'.\n'),"'"+t.replace("'","''")+"'",'"'+t.replace('"','\\"')+'"']+[p+(str(n)if n else'')+"\n"+I(t if '>'in p else s,S*(n-1 if n else 4))for p in ">:|:>+:>-:|+:|-".split(C)for n in range(10)])))
This produces the following JSON output when pasted into "Online YAML parser"
[
"YAML.\nIt's \"kek\".",
"YAML:\nIt's \"kek\".",
"YAML:\nIt's \"kek\".",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".",
"YAML:\nIt's \"kek\".",
"YAML:\nIt's \"kek\".",
"YAML:\nIt's \"kek\".",
"YAML:\nIt's \"kek\".",
"YAML:\nIt's \"kek\".",
"YAML:\nIt's \"kek\".",
"YAML:\nIt's \"kek\".",
"YAML:\nIt's \"kek\".",
"YAML:\nIt's \"kek\".",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".\n",
"YAML:\nIt's \"kek\".",
"YAML:\nIt's \"kek\".",
"YAML:\nIt's \"kek\".",
"YAML:\nIt's \"kek\".",
"YAML:\nIt's \"kek\".",
"YAML:\nIt's \"kek\".",
"YAML:\nIt's \"kek\".",
"YAML:\nIt's \"kek\".",
"YAML:\nIt's \"kek\".",
"YAML:\nIt's \"kek\"."
]
Before I try to get creative with more golfy techniques: is this the correct result? I still am not sure exactly whether or not I could get rid of the trailing newlines for some of these "indentation indicators". I am sure their creators meant well, but this is Perl-esque syntax madnes....