Sha256: 0838347d2966231dba8e3c3f19d1b8991d3ffc94d04f97d74b0b605285cfba76
Contents?: true
Size: 654 Bytes
Versions: 3
Compression:
Stored size: 654 Bytes
Contents
# frozen_string_literal: true RSpec.describe TTY::Markdown, 'header' do it "converts top level header" do parsed = TTY::Markdown.parse("#Header1") expect(parsed).to eq("\e[36;1;4mHeader1\e[0m\n") end it "converts headers" do headers =<<-TEXT # Header1 header1 content ## Header2 header2 content ### Header3 header3 content TEXT parsed = TTY::Markdown.parse(headers) expect(parsed).to eq([ "\e[36;1;4mHeader1\e[0m", "header1 content", "", " \e[36;1mHeader2\e[0m", " header2 content", "", " \e[36;1mHeader3\e[0m", " header3 content\n" ].join("\n")) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tty-markdown-0.6.0 | spec/unit/parse/header_spec.rb |
tty-markdown-0.5.1 | spec/unit/parse/header_spec.rb |
tty-markdown-0.5.0 | spec/unit/parse/header_spec.rb |