mdl 0.2.0 → 0.2.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
  SHA1:
3
- metadata.gz: 754ba4fcea65ab367c6851469bb744fbf4339800
4
- data.tar.gz: 22488dfa5f78f22cbf15ea204eadd437854515da
3
+ metadata.gz: 6bbddcf751f5ec8a6e7a2d184820c2ba747baa0c
4
+ data.tar.gz: 6a40d8e63ef5829c7177d5998dbd0363abae8eaa
5
5
  SHA512:
6
- metadata.gz: 9129f6ab9f1dc20326f2171eb70fd0d620becbc825f7b2d913a679b26a1f536643550f6db309590349ad1a7fcda3ae5cebed97e73bce5e1840ffb973348b2ec0
7
- data.tar.gz: 554f83c5d7f92e0ae15442acab0d9d18a7b2052fafc3c61037e15140354c2db6c6fca38f4d9a8bfbce95a817d6975d911016735b040414ad825186e85b276d72
6
+ metadata.gz: 4cb2592afd5b65dbe4bce8aa980ebfca2b9bb76c2d6d9deff09220375d53305706963a9ceb0d4582ac138dcb4bf2a380d792272cf704152a054c76f5859ad082
7
+ data.tar.gz: 82b4dd7b7b81e1ed956e3c39a6ee3a9e6e09deaeb96eeae6278860a69625d53c7ec269944d5db21cadbd7b639a8295cfde4f8540e4eff171cb03d6658f7d3212
@@ -1,5 +1,19 @@
1
1
  # Change Log
2
2
 
3
+ ## [v0.2.1](https://github.com/mivok/markdownlint/tree/v0.2.1) (2015-04-13)
4
+
5
+ [Full Changelog](https://github.com/mivok/markdownlint/compare/v0.2.0...v0.2.1)
6
+
7
+ ### Bugs fixed
8
+
9
+ * Incorrect parsing of rules/tags specification in .mdlrc (#81)
10
+ * Exception on image links with MD039 (#82)
11
+ * MD037 flags on two words beginning with underscores on the same line. (#83)
12
+
13
+ ### Known issues
14
+
15
+ * Exception on some lines with raw html list items in them (#83)
16
+
3
17
  ## [v0.2.0](https://github.com/mivok/markdownlint/tree/v0.2.0) (2015-04-13)
4
18
 
5
19
  [Full Changelog](https://github.com/mivok/markdownlint/compare/v0.1.0...v0.2.0)
@@ -80,14 +80,25 @@ module MarkdownLint
80
80
  # Put values in the config file
81
81
  MarkdownLint::Config.merge!(config)
82
82
 
83
+ # Set the correct format for any rules/tags configuration loaded from
84
+ # the config file. Ideally this would probably be done as part of the
85
+ # config class itself rather than here.
86
+ MarkdownLint::Config[:rules] = CLI.toggle_list(
87
+ MarkdownLint::Config[:rules]) unless MarkdownLint::Config[:rules].nil?
88
+ MarkdownLint::Config[:tags] = CLI.toggle_list(
89
+ MarkdownLint::Config[:tags], true) \
90
+ unless MarkdownLint::Config[:tags].nil?
91
+
83
92
  # Read from stdin if we didn't provide a filename
84
93
  if cli_arguments.empty? and not config[:list_rules]
85
94
  cli_arguments << "-"
86
95
  end
87
96
  end
88
97
 
89
- def self.toggle_list(s, to_sym=false)
90
- parts = s.split(',')
98
+ def self.toggle_list(parts, to_sym=false)
99
+ if parts.class == String
100
+ parts = parts.split(',')
101
+ end
91
102
  inc = parts.select{|p| not p.start_with?('~')}
92
103
  exc = parts.select{|p| p.start_with?('~')}.map{|p| p[1..-1]}
93
104
  if to_sym
@@ -496,8 +496,8 @@ rule "MD037", "Spaces inside emphasis markers" do
496
496
  # Kramdown doesn't parse emphasis with spaces, which means we can just
497
497
  # look for emphasis patterns inside regular text with spaces just inside
498
498
  # them.
499
- (doc.matching_text_element_lines(/(\*\*?|__?)\s.+\1/) | \
500
- doc.matching_text_element_lines(/(\*\*?|__?).+\s\1/)).sort
499
+ (doc.matching_text_element_lines(/\s(\*\*?|__?)\s.+\1/) | \
500
+ doc.matching_text_element_lines(/(\*\*?|__?).+\s\1\s/)).sort
501
501
  end
502
502
  end
503
503
 
@@ -515,8 +515,9 @@ rule "MD039", "Spaces inside link text" do
515
515
  tags :whitespace, :links
516
516
  check do |doc|
517
517
  doc.element_linenumbers(doc.find_type_elements(:a).select{|e|
518
- e.children[0].value.start_with?(" ") or
519
- e.children[0].value.end_with?(" ")})
518
+ e.children[0].type == :text and
519
+ (e.children[0].value.start_with?(" ") or
520
+ e.children[0].value.end_with?(" ")) })
520
521
  end
521
522
  end
522
523
 
@@ -1,3 +1,3 @@
1
1
  module MarkdownLint
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -29,3 +29,7 @@ Multiple * broken emphasis * _ broken emphasis _ {MD037}
29
29
  One-sided *broken emphasis * {MD037}
30
30
 
31
31
  One-sided * broken emphasis* {MD037}
32
+
33
+ Don't _flag on _words with underscores before them.
34
+
35
+ The same goes for words* with asterisks* after them.
@@ -5,3 +5,6 @@
5
5
  [ foo](http://bar/) {MD039}
6
6
 
7
7
  [ foo ](http://bar/) {MD039}
8
+
9
+ The following shouldn't break anything:
10
+ [![Screenshot.png](/images/Screenshot.png)](/images/Screenshot.png)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mdl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Harrison