Regex to ensure empty lines around code blocks

I realized that there’s a native Linter rule for this. Furthermore, I had it enabled. I’m not sure what prompted me to create this solution then. Perhaps the rule wasn’t being applied in some instances.