mdless 2.1.11 → 2.1.12

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: e103adb25eb7f60ff660cae6071863165cc8248d0d22a2aa673c240bc470f680
4
- data.tar.gz: 4ec87e6815250971fbd3b536776137be756ccf324fac5dda2abac16ca786fb22
3
+ metadata.gz: 3fbc37210004d25b7867c566bcc21bfa174a9e27bf74a1113659bc8809b187e8
4
+ data.tar.gz: 493d48b6061f21e408b0ae1ff43cdb47027bc07039e3678876a958c62177f42f
5
5
  SHA512:
6
- metadata.gz: d45d4d1c865a9c00bc710739cf208c300c7e421ccc785d633715fe7350af81928fe79b28effe050be39cba6c33f4c64f472424e4c103c9e5225bd8dfd1b85fba
7
- data.tar.gz: 29062adc822df60367956d417fb5e9851c03d149e81aec7cb439e3e8586c55fe9df5733d8774f587b8acae4ea91ebfff246b91734ea26473bd2f43859261228d
6
+ metadata.gz: f9b47996f59764d9324c7f3c63d3bfa62f392b2b71c1e93c4d49bb093af252c6a51baa60ca8d5d43e7d98139bfe9e9c20c868f5a43f136df645514d92deccc6f
7
+ data.tar.gz: 6327ebca9f23e4e0fa59c0911076d09e12299c3efbfb9c46e096416b3b4fb642a460e90ff52429c739c2ed3f53da1f8f589fe479797058e9160c60427b10d7db
data/CHANGELOG.md CHANGED
@@ -1,3 +1,5 @@
1
+ 2.1.12
2
+
1
3
  2.1.11
2
4
  : Better regex for highlighting raw HTML
3
5
  : Indentation in highlighted code blocks
@@ -602,13 +602,13 @@ module Redcarpet
602
602
  def indent_lines(input, spaces)
603
603
  return nil if input.nil?
604
604
 
605
- indent = spaces.scan(/ /).count
605
+ indent = spaces.scan(/\t/).count
606
606
 
607
607
  lines = input.split(/\n/)
608
608
  line1 = lines.shift
609
- pre = ' ' * (indent + 1)
610
- cols = MDLess.cols - pre.length
611
- body = lines.map { |l| "#{pre}#{l}" }.join("\n")
609
+ pre = spaces + (" " * (indent + 1))
610
+
611
+ body = lines.map { |l| "#{pre}#{l.rstrip}" }.join("\n")
612
612
  "#{line1}\n#{body}"
613
613
  end
614
614
 
@@ -648,7 +648,7 @@ module Redcarpet
648
648
  end
649
649
 
650
650
  def fix_list_spacing(input)
651
- input.gsub(/( *\n)+( *)<<listitem/, "\n\\2<<listitem").gsub(/\n{2,}/, "\n\n")
651
+ input.gsub(/( *\n)+( *)<<listitem/, "\n\\2<<listitem").gsub(/( *\n){2,}/, "\n\n")
652
652
  end
653
653
 
654
654
  def nest_lists(input, indent = 0)
@@ -695,7 +695,7 @@ module Redcarpet
695
695
  end
696
696
 
697
697
  content = m['content'] =~/<<listitem/ ? fix_items(m['content'], indent, levels) : m['content']
698
- color_list_item(' ' * indent, uncolor_grafs(content), m['type'].to_sym, levels[indent])
698
+ color_list_item(" " * indent, uncolor_grafs(content), m['type'].to_sym, levels[indent])
699
699
  end
700
700
  end
701
701
 
@@ -1073,6 +1073,7 @@ module Redcarpet
1073
1073
  input = reference_links(input) if MDLess.options[:links] == :reference || MDLess.options[:links] == :paragraph
1074
1074
  # lists
1075
1075
  input = fix_lists(input)
1076
+ puts input
1076
1077
  fix_colors(input)
1077
1078
  end
1078
1079
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CLIMarkdown
4
- VERSION = '2.1.11'
4
+ VERSION = '2.1.12'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mdless
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.11
4
+ version: 2.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-03 00:00:00.000000000 Z
11
+ date: 2023-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redcarpet