Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
added single quote conversion
  • Loading branch information
inukshuk committed Oct 14, 2011
1 parent 34b6ca8 commit 9c0355e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions features/punctuation.feature
Expand Up @@ -41,3 +41,5 @@ Feature: Decode LaTeX punctuation directives
| latex | unicode | description |
| `` | “ | left double quotes |
| '' | ” | right double quotes |
| ` | ‘ | left single quotes |
| ' | ’ | right single quotes |
4 changes: 3 additions & 1 deletion lib/latex/decode/punctuation.rb
Expand Up @@ -34,14 +34,16 @@ class Punctuation < Decoder
--
---
``
`
''
'
]].freeze

@map = @macros.merge(@symbols).freeze

@patterns = [
/\\(#{ @macros.keys.map { |k| Regexp.escape(k) }.compact.join('|') })(?:\{\}|\s+|\b)/ou,
/(-+|``|'')/,
/(-+|`{1,2}|'{1,2})/,
/()\\([$%#_])(\{\})?/,
/()\\(~)\{\}/
].freeze
Expand Down

0 comments on commit 9c0355e

Please sign in to comment.