DEV Community

Artem Tanyhin
Artem Tanyhin

Posted on

1

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.

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay