[docs] remove unneeded \n at end of examples
[docs] api: use restdown instead of generating HTML directly - better looking and more generic