When I come across a situation like that, i consider the chunk of code reusable and split it into a separate function. It may not be perfect and you might need to make that function more generic than it was but I think it makes sense.
As others have said, V8 in the title is confusing.. v8.0 would be better. Also, the website at a glance was very confusing to me. I feel the top should have a section about what "Flat" is and what it solves. I should know your mission statement right away.
It looks like a very nice piece of composing software but I fear most of your visitors will close your website before figuring that out.