asciidoctor-html5s 0.1.0.beta.10 → 0.1.0.beta.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/html5s/replacements.rb +10 -3
- data/lib/asciidoctor/html5s/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: a9072cf9f64b3d874247c3d236eb74ea5373961c1a6d60e6cff310f60365d077
|
4
|
+
data.tar.gz: 1f9e5a1e368753ec09b49007f06f0b74785b34db7d4f72061e9f7ca7290f7aa1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82170204752958af610a625c76fc0fb8f1ce1ac35219b46445f8c0c8dbed8530d07453e7fd7b0bd541ebf10bbb442ec8091c9f47c06fcf56bbbe93294f0edaca
|
7
|
+
data.tar.gz: b96df671bc00d7aabeca8eea657d9e6d8b98d5b85d06064513f204fcd9d4895b35ec3574328323a9b2210be0d74b8311ec37b7bff761794582dc441e9812cbf4
|
@@ -1,15 +1,22 @@
|
|
1
1
|
require 'asciidoctor' unless RUBY_PLATFORM == 'opal'
|
2
2
|
|
3
3
|
module Asciidoctor
|
4
|
+
# XXX: Regexps escaping is kinda broken in Opal 0.11.x. This is a hack how to
|
5
|
+
# make the third regexp work both in Ruby and Opal.
|
6
|
+
_BACKSLASH = '\\\\'
|
7
|
+
|
4
8
|
# XXX: Modifies constant defined in Asciidoctor.
|
5
9
|
REPLACEMENTS.unshift(
|
6
10
|
# foo --- bar ->  — 
|
7
|
-
[/(^|\n|
|
11
|
+
[/(^|\n| )---( |\n|$)/, ' — ', :none],
|
8
12
|
# foo---bar -> —{ZERO WIDTH SPACE}
|
9
|
-
[/(#{CG_WORD})
|
13
|
+
[/(#{CG_WORD})---(?=#{CG_WORD})/, '—​', :leading],
|
14
|
+
|
10
15
|
# foo -- bar -> &thinksp;– 
|
11
|
-
|
16
|
+
# Note: The regexp is copied from Asciidoctor.
|
17
|
+
[/(^|\n|#{_BACKSLASH}| )--( |\n|$)/, ' – ', :none],
|
12
18
|
# foo--bar -> –
|
19
|
+
# Note: The regexp is copied from Asciidoctor.
|
13
20
|
[/(#{CG_WORD})\\?--(?=#{CG_WORD})/, '–', :leading],
|
14
21
|
)
|
15
22
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asciidoctor-html5s
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.beta.
|
4
|
+
version: 0.1.0.beta.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jakub Jirutka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|