Row coloring too wide (Pandoc MD -> PDF)

like this:

enter image description here

i extract from yours code minimal working example, where i add code which should solve your problem:

\documentclass{article}
\usepackage[table]{xcolor}
\usepackage{booktabs, longtable}

\begin{document}
\begin{longtable}{@{}   >{\columncolor{white}[0pt][\tabcolsep]}r % <---
                        l
                        l
                        >{\columncolor{white}[\tabcolsep][0pt]}c % <---
                  @{}   }
\caption{Demonstration of pipe table syntax.}\\
    \toprule
Right & Left & Default & Center             \\
    \midrule
\endfirsthead
    \toprule
Right   & Left  & Default   & Center        \\
    \midrule
    \endhead
\rowcolor{gray!10}
12      & 12    & 12        & 12            \\
123     & 123   & 123       & 123           \\
1       & 1     & 1         & 1             \\
\bottomrule
\end{longtable}

\end{document}