Skip to content
Browse files

added single quote conversion

  • Loading branch information...
1 parent 34b6ca8 commit 9c0355eb2dccac4b0d3164d98857f6cea383bff1 @inukshuk committed Oct 14, 2011
Showing with 5 additions and 1 deletion.
  1. +2 −0 features/punctuation.feature
  2. +3 −1 lib/latex/decode/punctuation.rb
View
2 features/punctuation.feature
@@ -41,3 +41,5 @@ Feature: Decode LaTeX punctuation directives
| latex | unicode | description |
| `` | “ | left double quotes |
| '' | ” | right double quotes |
+ | ` | ‘ | left single quotes |
+ | ' | ’ | right single quotes |
View
4 lib/latex/decode/punctuation.rb
@@ -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

0 comments on commit 9c0355e

Please sign in to comment.
Something went wrong with that request. Please try again.