Skip to content

Commit

Permalink
fix 57 examples, 20 failures
Browse files Browse the repository at this point in the history
  • Loading branch information
Tolia committed Aug 8, 2013
1 parent 65534fb commit feadebe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/typograph/adapters/russian.rb
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def initialize(options={})

# Делаем неразрывными слова с дефисом.
# Пример: "слово-слово", "слово-слово-слово".
/(\p{L}+((&ndash;|–|-)\p{L}+){1,2})/ => '<nobr>\0</nobr>',
/(\^|;)((\p{L}+((&ndash;|–|-)\p{L}+){1,2}))/ => '\1<nobr>\2</nobr>',

# Меняем ё на е и Ё на Е
/ё/ => 'е',
Expand Down
6 changes: 6 additions & 0 deletions spec/typograph_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -399,4 +399,10 @@
Typograph.process(text, OPT).should eq text_processed
end

it 'Не трогаем ссылки в маркдауне' do
text = "Глава из книги Бориса Гройса «Поэтика политики»](http://theoryandpractice.ru/posts/6762-wikileaks-vosstanie-klerkov-glava-iz-knigi-borisa-groysa-poetika-politiki)"
text_processed = "Глава из&nbsp;книги Бориса Гройса «Поэтика политики»](http://theoryandpractice.ru/posts/6762-wikileaks-vosstanie-klerkov-glava-iz-knigi-borisa-groysa-poetika-politiki)"
Typograph.process(text, OPT).should eq text_processed
end

end

0 comments on commit feadebe

Please sign in to comment.