Skip to content

Commit

Permalink
Use verb and backticks for inline code
Browse files Browse the repository at this point in the history
  • Loading branch information
samwilson authored May 11, 2023
1 parent d8605ea commit f4d4d51
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/CodeRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ public function render(Node $node, ChildNodeRendererInterface $childRenderer)
{
Code::assertInstanceOf($node);

return '\\texttt{' . $node->getLiteral() . '}';
return '\\verb`' . $node->getLiteral() . '`';
}
}
2 changes: 1 addition & 1 deletion tests/data/code.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ this is text
this is PHP code
```

this has `inline code` in it
this has `inline co_de` in it
2 changes: 1 addition & 1 deletion tests/data/code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f4d4d51

Please sign in to comment.