reverse_adoc 0.2.3 → 0.2.4

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: 8003d7dcf58a0561295e898bbcc93ce2c4f6168f5b9e2bcb17791fc183a48d04
4
- data.tar.gz: 1229e27b2b00ce61d1004bf3348552b8c3749d3b15f0490c3ab85d63bec94964
3
+ metadata.gz: 29a6b82d9aba4bb3f581f140c9518a69b97e60a7127c95611333af61e72f8055
4
+ data.tar.gz: 49995de78b075000a18f4cdc685d42106ca5cc5c1d83730159e310a02cc94680
5
5
  SHA512:
6
- metadata.gz: 5e162c8c8a83ca274faed8247ff8fde809118e1a2fa02e3cfaf75f1804d9163d6019ee5bd79a33fe3b2dd00aee2780e8809f2139ffbc118899a8985689feedf8
7
- data.tar.gz: d8c715a4ccb49082a832590f89b4b434b1502e1d7c2bcc9539fb0c5b47ddc09afb8b87236a48913ebe8dbecb02f848ffa20d83f9b7f2100bc3ed57355309bb25
6
+ metadata.gz: 6be9a00dcb09204d8b0acb6adf0d1ec0b984fe211b02a76e10395989bca38ac96ebbf0f217e4383cb4ede02efa144dd8b8f0acc1d93523ba9d473a28b27b28dc
7
+ data.tar.gz: d127155eb9d53ac19496a1e3be9bc7185544ee5c61b5e77e1476e6e48572685a1e3b7a36466654e66f84ae01d3434ce0ffc67f202d265b551be02c264cdf6de0
data/Gemfile CHANGED
@@ -4,3 +4,5 @@ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
4
 
5
5
  # Specify your gem's dependencies in reverse_asciidoctor.gemspec
6
6
  gemspec
7
+
8
+ gem "byebug"
data/bin/w2a CHANGED
@@ -7,12 +7,12 @@ require 'reverse_asciidoctor'
7
7
 
8
8
  def scrub_whitespace(string)
9
9
  string = string.dup
10
- string.gsub!(' ', ' ') # HTML encoded spaces
11
- string.sub!(/\A[[:space:]]+/, '') # document leading whitespace
12
- string.sub!(/[[:space:]]+\z/, '') # document trailing whitespace
13
- string.gsub!(/([ ]+)$/, '') # line trailing whitespace
10
+ string.gsub!(/ |\ |\u00a0/i, ' ') # HTML encoded spaces
11
+ string.sub!(/^\A[[:space:]]+/m, '') # document leading whitespace
12
+ string.sub!(/[[:space:]]+\z$/m, '') # document trailing whitespace
13
+ string.gsub!(/([ ]+)$/, ' ') # line trailing whitespace
14
14
  string.gsub!(/\n\n\n\n/, "\n\n") # Quadruple line breaks
15
- string.delete!(' ') # Unicode non-breaking spaces, injected as tabs
15
+ #string.delete!(' ') # Unicode non-breaking spaces, injected as tabs
16
16
  # following added by me
17
17
  string.gsub!(%r{<h[1-9][^>]*></h1>}, " ") # I don't know why Libre Office is inserting them, but they need to go
18
18
  string.gsub!(%r{<h1[^>]* style="vertical-align: super;[^>]*>([^<]+)</h1>},
@@ -1,4 +1,5 @@
1
- require 'fileutils'
1
+ require "fileutils"
2
+ require "pathname"
2
3
 
3
4
  module ReverseAsciidoctor
4
5
  module Converters
@@ -1,3 +1,3 @@
1
1
  module ReverseAsciidoctor
2
- VERSION = '0.2.3'
2
+ VERSION = '0.2.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reverse_adoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-07 00:00:00.000000000 Z
11
+ date: 2019-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -247,7 +247,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
247
247
  - !ruby/object:Gem::Version
248
248
  version: '0'
249
249
  requirements: []
250
- rubygems_version: 3.0.3
250
+ rubyforge_project:
251
+ rubygems_version: 2.7.6
251
252
  signing_key:
252
253
  specification_version: 4
253
254
  summary: Generate AsciiDoc from HTML and Microsoft Word via CLI or library.