Sha256: 699d4382a7f22d89919d08cb18b14572af5ad33de3751dbc83b44ed06a947e00
Contents?: true
Size: 733 Bytes
Versions: 3
Compression:
Stored size: 733 Bytes
Contents
# frozen_string_literal: true RSpec.describe TTY::Markdown, 'typography' do let(:symbols) { TTY::Markdown.symbols } it "converts header with typographic symbols" do markdown =<<-TEXT --- << typographic >> ... symbols -- TEXT parsed = TTY::Markdown.parse(markdown) expect(parsed).to eq("#{symbols[:mdash]} #{symbols[:laquo]} typographic #{symbols[:raquo]} #{symbols[:hellip]} symbols #{symbols[:ndash]}\n") end it "converts smart quotes to utf-8 chars" do markdown = "To \"extract\" `script.rb`'s..." parsed = TTY::Markdown.parse(markdown, colors: 16) expect(parsed).to eq("To #{symbols[:ldquo]}extract#{symbols[:rdquo]} \e[33mscript.rb\e[0m#{symbols[:rsquo]}s#{symbols[:hellip]}\n") end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tty-markdown-0.6.0 | spec/unit/parse/typography_spec.rb |
tty-markdown-0.5.1 | spec/unit/parse/typography_spec.rb |
tty-markdown-0.5.0 | spec/unit/parse/typography_spec.rb |