convert link elements to markdown before encode
Code blocks are generated by either indenting with one tab stop or four spaces.