diff --git a/src/CodeRenderer.php b/src/CodeRenderer.php index 56136d3..7c59442 100644 --- a/src/CodeRenderer.php +++ b/src/CodeRenderer.php @@ -18,6 +18,6 @@ public function render(Node $node, ChildNodeRendererInterface $childRenderer) { Code::assertInstanceOf($node); - return '\\texttt{' . $node->getLiteral() . '}'; + return '\\verb`' . $node->getLiteral() . '`'; } } diff --git a/tests/data/code.md b/tests/data/code.md index 7ed5a9a..82db90f 100644 --- a/tests/data/code.md +++ b/tests/data/code.md @@ -8,4 +8,4 @@ this is text this is PHP code ``` -this has `inline code` in it +this has `inline co_de` in it diff --git a/tests/data/code.tex b/tests/data/code.tex index 74c6c40..f5b965b 100644 --- a/tests/data/code.tex +++ b/tests/data/code.tex @@ -8,5 +8,5 @@ \lstset{language={php}}\begin{lstlisting} this is PHP code \end{lstlisting} -this has \texttt{inline code} in it +this has \verb`inline co_de` in it