First, let me set the stage: suppose we have a bilinear form $B(u,v)=\int_\Omega \nabla u \cdot \nabla v \, \mathrm{d}x$, where $\Omega \subset \mathbb{R}^d$ and $u,v \in H_0^1(\Omega)$. Moreover, $\mathcal{T}$ is a triangulation of the space $\Omega$.Elementwise integration by parts leads to $$ B(u,v)=\sum_{K \in \Omega} \left\{- \int_K \Delta u v \, \mathrm{d}x+\int_{\partial K} \nabla u \cdot \mathrm{n}_K v \, \mathrm{d}s\right\},$$ where $\mathrm{n}_K$ is the unit exterior normal vector to $\partial K$. I'm fine with all of that.
For the a posteriori analysis, the integrals over the boundary terms are rearranged. In the book it's written, that if an edge $e$ is shared by two elements $K_1$ and $K_2$, then $v|_{K_1}=v|_{K_2}$. I don't see why that should be true, as the function $v$ has not to be continuous.