Run sed -i -f <this_file.sed> _includes/ref/bitcoin-core/rpcs/rpcs/* _includes/ref/bitcoin-core/rest/requests/get_* _includes/helpers/vars.md
## On lines that start with a pipe:
/^|/ {
## Delete all table header/table body divider lines
/|----/d;
## Escape all double quotes
s/"/\\"/g;
## Replace lines that look like NTPD headers with a itemplate start block
s/^| Name *| Type.*/{% itemplate ntpd1 %}/;
## Delete extraneous whitespace
s/ *|/|/g;
## Replace the first pipe with "- name:" plus a start quote
s/^| */- n: "/;
## Replace the remaining pipes, starting each one with a newline and two spaces
s/| */"\n t: "/;
s/| */"\n p: "/;
s/| */"\n d: "/;
## Add a close quote and an empty line after the last list item
## built from a single table row, except for the header row. This
## improves readability/maintainability
/[^}]$/s/$/"\n/;
}
## Replace the old table class with the itemplate close tag
s/{:.ntpd}/{% enditemplate %}/