DEV Community

Artem Tanyhin
Artem Tanyhin

Posted on

Refactoring SSGo: letting old code go is kinda sad

Hey there! Glad you came again. This week I've been working on refactoring Markdown parsing to add all Markdown features support. Let me tell you about how it went.

Where the idea came from

I initially wanted SSGo to have full Markdown support, but when I was trying out Docusaurus I decided to use a ready-made package called gomarkdown for parsing.

There however is a downside to this: now the whole file needs to be stored in RAM instead of line by line. But the features that gomarkdown brings are worth it.

Refactoring

When you write code you put your soul into it. And when you have to remove it is kind of sad. You know you're making the code better but there is a part of you that is attached to that code...

Anyways. I created an issue on my repo to mark that I am working on it and started working. I changed some test files and made a single markdown file that encapsulates all of the features and refactored the code. Then, I squashed all commits into one and pushed it to remote.

Top comments (0)