It would be nicer to put the triple backtick on the next line by itself.  That way the opening/closing of the ticks are inline with each other.  Reading that code quickly I may think the ticks still need to be added on as I expect them to be on a line by themselves like the opening are.