tty-markdown 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 921ecfb3d45e680418a18bda8034a67c5e2a82bbe6d8368e2075783e34ff6d9e
4
- data.tar.gz: 4acbf4a71b69dc363edae7263447118c504911a1ab452aa7c754c7c2d692b23d
3
+ metadata.gz: 281ea39bffa3d221f073b13f978c2955df2cf7df04a5419b5b99d4be95409f9b
4
+ data.tar.gz: cb68e3e7791fafa7223f05b1e8b3739726423dbddb50ee2e5b4cfe1b5d914ad9
5
5
  SHA512:
6
- metadata.gz: 1f0e70e1754a9ea1cdd9994f6faf5940b5a5e86ed0f16cd33bde4ef20cd12a7f2f93e76d9edc4216e71f6287e3345d6f58e4b717e38e4278d982c29e6ccd472b
7
- data.tar.gz: 2c6bd5c9e87300a70b12464c9a024aa29d3636ae66b03ee3bd0dcccff8f7889ae588b5a38fc9e5b1d97dc67f8c1bbcab1626b611d8d8726eef0a6ef6122cf3c0
6
+ metadata.gz: 01b88370fce23760bcf10ffa5b41d906a44018bd67545491b02e86bf1ac1ac0bd1479279f085437a0847fad84bc850d0f202f34734421c7d5014c0d2e1ff07f1
7
+ data.tar.gz: 4a1ccb73bcd8a3d1849ecf2db21c2106517ebd2117db6531e1353594a8f2b8fd1daf47ed4d5b61a133f05914c449f166a698887b346de1c4dc204da23d203884
@@ -1,5 +1,10 @@
1
1
  # Change log
2
2
 
3
+ ## [v0.5.1] - 2019-02-07
4
+
5
+ ### Fixed
6
+ * Fix spaces around inline code quotes collapses inside list items
7
+
3
8
  ## [v0.5.0] - 2018-12-13
4
9
 
5
10
  ### Changed
@@ -135,7 +135,7 @@ module TTY
135
135
 
136
136
  def convert_text(el, opts)
137
137
  text = Strings.wrap(el.value, @width)
138
- text.strip! if opts[:strip]
138
+ text = text.chomp if opts[:strip]
139
139
  indent = ' ' * opts[:indent]
140
140
  text = text.gsub(/\n/, "\n#{indent}")
141
141
  opts[:result] << text
@@ -2,6 +2,6 @@
2
2
 
3
3
  module TTY
4
4
  module Markdown
5
- VERSION = '0.5.0'.freeze
5
+ VERSION = '0.5.1'
6
6
  end # TTY
7
7
  end # Markdown
@@ -68,6 +68,19 @@ RSpec.describe TTY::Markdown, 'list' do
68
68
  ].join("\n"))
69
69
  end
70
70
 
71
+ it "displays inline codeblocks in lists correctly" do
72
+ markdown =<<-TEXT
73
+ - Version: run `ruby -v` or `ruby --version`.
74
+ - Help: run `ruby -h` or `ruby --help`.
75
+ TEXT
76
+
77
+ parsed = TTY::Markdown.parse(markdown, colors: 16)
78
+ expect(parsed).to eq([
79
+ "#{pastel.yellow(symbols[:bullet])} Version: run \e[33mruby -v\e[0m or \e[33mruby --version\e[0m.",
80
+ "#{pastel.yellow(symbols[:bullet])} Help: run \e[33mruby -h\e[0m or \e[33mruby --help\e[0m.\n"
81
+ ].join("\n"))
82
+ end
83
+
71
84
  it "convert ordered numbered list of nested items" do
72
85
  markdown =<<-TEXT
73
86
  1. Item 1
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tty-markdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Murach
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-13 00:00:00.000000000 Z
11
+ date: 2019-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kramdown