updated markdown script to create clean markdown