This Slogging thread by and occurred in 's official # channel, and has been edited for readability. 🤖 🤖 🤖 Arthur Tkachenko Limarc Ambalina slogging programming 💚 1 Arthur Tkachenko Sep 28, 2021, 4:28 PM While working on repository, we created and adapted a few cool things that I want to share with others. Intro: "I don't like a lot to start a new project from scratch." So I'm usually trying to use GitHub search and see what was done by more experienced and crazy developers. I find a number of repositories that were doing similar things(parsing markdown). But for different reasons, you can't just fork them and make that code work as necessary. So we "steal" some cool implementations and then rewrite them for our needs. https://github.com/atherdon/markdown-to-email We have a lot of iterations, and at some point, I realize that every project that was doing a similar parsing for markdown syntax used regex`es. But they(RegEx`es) were always highly mixed in their code. long code. smelly code. I was like: "I don't want to keep it all in one place. It's just eating space in my brain. It's not easy to test, etc, etc" and if you know about regular expressions, you probably aware about a lot of memes --- : other developers were creating a list of constants and put them into their files. we did it too. : I move out a lot of constants that were representing RegEx strings into a separate file and just import it. fancy! Step Zero Step One : move all constants into the package folder and try to create a separate npm package, using Rollup. Step Two Module structure with Rollup config and a few js files is very simple. Another huge plus you can separate your tests, which is necessary for the future. and I like that it's very independent and doing only one thing. nothing more. you can see a structure below inside "src" i have few files with regular expressions. one file was related to storing default markdown tags that can be used in other projects. another file was related to custom tags that we "invented" for our own needs. I also have a separate file for lists only. lists in markdown syntax are pure madness. they should be covered with more tests. : I realize that I want to contribute something to the world and moved default tags into a separated npm module and a separate GitHub repository. For sure, it's a small input, but nobody did it before. GitHub link is here: and you can install it - Step Three https://github.com/atherdon/markdown-regex yarn add markdown-regex and I'm happy to see it on npm(while it's not indexed well, yet): https://www.npmjs.com/package/markdown-regex Oops, looks like I didn't move tests into a new repository 🙂 time to do the next release 🙂 Back to the Internet! Limarc Ambalina Sep 29, 2021, 6:39 AM Looks like you are keeping busy ! 😎 Read more : slogging posts Slogging #26: How Scared You Are Of Deepfakes? How to Win the Velo Writing Contest: A Detailed Cheat Sheet Ask Me How To Lose Your Company Without Losing Your Faith How To Prepare Yourself For a Marathon [Part One] Stay Tuned! What Customers Want From EV Manufacturers