oald_parser 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/oald_parser/formatter.rb +2 -2
- metadata +2 -2
@@ -7,7 +7,7 @@ module OaldParser
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def format(content)
|
10
|
-
lined_content = content.gsub(/<\s*br\s*\/*>/,
|
10
|
+
lined_content = content.gsub(/<\s*br\s*\/*>/, "\n")
|
11
11
|
text = Nokogiri::HTML(lined_content).text
|
12
12
|
first_lines = first_lines(text, @options[:lines])
|
13
13
|
first_lines.strip
|
@@ -17,7 +17,7 @@ module OaldParser
|
|
17
17
|
|
18
18
|
private
|
19
19
|
def first_lines(text, lines)
|
20
|
-
text.split(
|
20
|
+
text.split("\n").first(lines).join("\n")
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|