add markdown function for .md & .text file