hooks-md.R: Only collapse matched back-ticks.

- Ensure the fence is alone on the line and lengths are equal before
  collapsing.

Signed-off-by: Thell Fowler <thell@tbfowler.name>

I didn't see any tests for chunk params so it is omitted.

[original regex match](https://www.debuggex.com/r/LGaQOpOS6zkNhRho)  
[new regex match](https://www.debuggex.com/r/wBwnrGcNGzTFSGcR)