solargraph 0.37.1 → 0.37.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/solargraph/pin/documenting.rb +19 -7
- data/lib/solargraph/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c6e8cd33eaba452660f445e5edf77658e1a3bf0e7604b753b6632e06ce4af00
|
4
|
+
data.tar.gz: bf6d0596a144b1bee2968e87f451b02a60cafa35c9871a0abe8b0f29a1c360cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f28aa0e7914a6d8f04bb25ea99f81cbb795a1d1bb76121397aa291e0db1132e108fd71ed814d4b65807ed985dbf60b4909a20e976cca0ed80c66e6770224b7c
|
7
|
+
data.tar.gz: 79cc5e511a24c736f7564233f9c0bdc0593b738c739c9fc7897bca7e3b2e2361d0f520ccea009514acc4f2dcd4d60b05778487af2c4d18367a0222abe40b1e65
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'rdoc'
|
4
3
|
require 'reverse_markdown'
|
5
|
-
require 'yard'
|
6
4
|
|
7
5
|
module Solargraph
|
8
6
|
module Pin
|
@@ -12,11 +10,16 @@ module Solargraph
|
|
12
10
|
# @return [String]
|
13
11
|
def documentation
|
14
12
|
@documentation ||= begin
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
13
|
+
indented = false
|
14
|
+
normalize_indentation(docstring.to_s).gsub(/\t/, ' ').lines.map { |l|
|
15
|
+
if l =~ /^ [^\s]/ || (l.start_with?(' ') && indented)
|
16
|
+
indented = true
|
17
|
+
" #{l}"
|
18
|
+
else
|
19
|
+
indented = false
|
20
|
+
l # (was `unhtml l`)
|
21
|
+
end
|
22
|
+
}.join
|
20
23
|
end
|
21
24
|
end
|
22
25
|
|
@@ -36,6 +39,15 @@ module Solargraph
|
|
36
39
|
return line unless spaces.odd?
|
37
40
|
line[1..-1]
|
38
41
|
end
|
42
|
+
|
43
|
+
# @todo This was tested as a simple way to convert some of the more
|
44
|
+
# common markup in documentation to Markdown. We should still look
|
45
|
+
# for a solution, but it'll have to be more robust than this.
|
46
|
+
def unhtml text
|
47
|
+
text.gsub(/\<\/?(code|tt)\>/, '`')
|
48
|
+
.gsub(/\<\/?(em|i)\>/, '*')
|
49
|
+
.gsub(/\<\/?(strong|b)\>/, '**')
|
50
|
+
end
|
39
51
|
end
|
40
52
|
end
|
41
53
|
end
|
data/lib/solargraph/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solargraph
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.37.
|
4
|
+
version: 0.37.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fred Snyder
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backport
|