Original Reddit post

±---------------------+ | ±-------------+ | | | Component A | | | | short | | | ±-------------+ | ±---------------------+ Just why? It’s so annoying to keep fixing markdown documents manually. Claude is good at creating decent documentation with useful diagrams in markdown. However for some reason the diagrams are often messed up. The vertical wall characters │ are often not aligned right making the diagrams visually broken. This becomes a maintenance problem fast. So I built a tool that fixes them automatically. It’s an open source Go library that builds and installs a CLI tool called flow-wire-diagram . Give it a Markdown file and it finds every box diagram, parses the box structure, snaps every misaligned │ back to the correct column, and writes the file back in place. Text content is never touched, only structural characters are moved. If a repair would change actual text, it aborts and warns you instead. You can drop it in a CI pipeline and automate fixing the markdown diagrams. The algorithm does exactly one thing. Build a box nesting tree, walk each line, snap characters to known column positions. 97% test coverage, a fuzz suite seeded with all diagram types, and a content-safety check that prevents silent data loss. Link to the GIT repo https://github.com/shapestone/flow-wire-diagram if you want to try it out. submitted by /u/One_Curious_Cats

Originally posted by u/One_Curious_Cats on r/ClaudeCode