.h
.[1][]
.[1]
select(!.code)
.code("js")
.code.lang
select(is_mdx())
.link.url
.h
| let link = to_link("#" + to_text(self), to_text(self), "")
| let level = .h.depth
| if (!is_none(level)): to_md_list(link, to_number(level))
def sitemap(item, base_url):
let path = replace(to_text(item), ".md", ".html")
| let loc = add(base_url, path)
| s"<url>
<loc>${loc}</loc>
<priority>1.0</priority>
</url>"
end
def snake_to_camel(x):
let words = split(x, "_")
| foreach (word, words):
let first_char = upcase(first(word))
| let rest_str = downcase(slice(word, 1, len(word)))
| s"${first_char}${rest_str}";
| join("")
end
| snake_to_camel()
map(arr, fn(x): x + 1;)
filter(arr, fn(x): x > 10;)
$ mq 'include "csv" | csv_parse(true) | csv_to_markdown_table()' example.csv
$ mq -S 's"\n${__FILE__}\n"' 'identity()' docs/books/**/**.md