added the option to pass markdown data as a string instead of a filename