4 ms·
Show HN: Markdown Cleaner – clean AI-generated Markdown before pasting
If you ever paste AI-generated markdown into Google Docs (using the 'Paste as Markdown' option), you might have noticed that the formatting is not always perfect.
- Headings are often too deep: the top level headings use heading 2.
- Links are often long and ugly, which is annoying when they appear within the body of the document.
- Bulleted lists often use hyphens instead of asterisks (*) which means you get hyphens as bullets instead of circles/dots.
- sourcegate 2y agoSounds dope I made something similar recently https://x.com/petesena/status/1910556481100853515?s=46&t=LIgd-Goaa7UMXWr_bjjgSg https://x.com/petesena/status/1910556481100853515?s=46&t=LIg...
- rahimnathwani 2y agoIf you're on MacOS, you can deal with the headings and bullets using a command line instead: pbpaste | sed -E 's/##/#/g' | sed -E 's/^([[:space:]]*)-([[:space:]])/\1*\2/g' | pbcopy
- lygten 2y agoOn Linux you can use: xsel --clipboard | sed -E 's/##/#/g' | sed -E 's/^([[:space:]]*)-([[:space:]])/\1*\2/g' | xsel --clipboard --input