Skip to content

Commit

Permalink
To add a "snip" test and make LaTeX formatting similar to @code@.
Browse files Browse the repository at this point in the history
  • Loading branch information
kleb committed Mar 12, 2009
1 parent b870a2d commit 526d386
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/redcloth/formatters/latex.rb
Expand Up @@ -203,7 +203,7 @@ def fn(opts)
end

def snip(opts)
"\\begin{verbatim}#{opts[:text]}\\end{verbatim}"
"\\verb`#{opts[:text]}`"
end

def quote1(opts)
Expand Down
5 changes: 5 additions & 0 deletions test/code.yml
Expand Up @@ -4,6 +4,11 @@ in: 'This is an empty dictionary: @{}@'
html: '<p>This is an empty dictionary: <code>{}</code></p>'
latex: "This is an empty dictionary: \\verb@{}@\n\n"
---
name: inline snip
in: "The ```command``` is here."
html: "<p>The <pre><code>command</code></pre>\n is here.</p>"
latex: "The \\verb`command` is here.\n\n"
---
name: inline code escapement
in: 'Please type @cat "file.txt" > otherfile.txt@ at the prompt.'
html: '<p>Please type <code>cat "file.txt" &gt; otherfile.txt</code> at the prompt.</p>'
Expand Down

0 comments on commit 526d386

Please sign in to comment.