slaw 6.1.0 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/lib/slaw/extract/html_to_akn_text.xsl +27 -2
- data/lib/slaw/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: eccd929903562e49bbd2ed7d10cd54733d4adce9e304aa94009e7c2ec8876b9a
|
|
4
|
+
data.tar.gz: ad3e092d320e446fb14c24b78ac85041da8f76c19c783ba559cee413f52d1b7e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2cd345f3906a9fa7742e7e57e631ef39e50c449e7f80beebd891c51a8053acbc2745b7ed7963d996494cf58478826d9161a57a25e3c0808f0d3a2f1a5bc924c6
|
|
7
|
+
data.tar.gz: afd015ffd10e75e222907a02b7c5bcd1cb0535287a6618cf78afd4c18333705985c060c78e5564e7a228d1047b33680c680a4526a22e6649164db6e54335f92b
|
data/README.md
CHANGED
|
@@ -81,6 +81,10 @@ You can create your own grammar by creating a gem that provides these files and
|
|
|
81
81
|
|
|
82
82
|
## Changelog
|
|
83
83
|
|
|
84
|
+
### 6.2.0 (15 Jan 2020)
|
|
85
|
+
|
|
86
|
+
* Better support for ol, ul and li when importing from HTML
|
|
87
|
+
|
|
84
88
|
### 6.1.0 (6 Jan 2020)
|
|
85
89
|
|
|
86
90
|
* Support Chapters inside Parts
|
|
@@ -11,6 +11,32 @@
|
|
|
11
11
|
|
|
12
12
|
<xsl:template match="head|style|script|link" />
|
|
13
13
|
|
|
14
|
+
<xsl:template match="ul|ol">
|
|
15
|
+
<xsl:apply-templates />
|
|
16
|
+
<xsl:text> </xsl:text>
|
|
17
|
+
</xsl:template>
|
|
18
|
+
|
|
19
|
+
<xsl:template match="ul/li">
|
|
20
|
+
<!-- * foo -->
|
|
21
|
+
<xsl:text>* </xsl:text>
|
|
22
|
+
<xsl:apply-templates />
|
|
23
|
+
<xsl:text> </xsl:text>
|
|
24
|
+
</xsl:template>
|
|
25
|
+
|
|
26
|
+
<xsl:template match="ol/li">
|
|
27
|
+
<!-- 1. foo -->
|
|
28
|
+
<xsl:text>\</xsl:text>
|
|
29
|
+
<xsl:value-of select="position()" />
|
|
30
|
+
<xsl:text>. </xsl:text>
|
|
31
|
+
<xsl:apply-templates />
|
|
32
|
+
<xsl:text> </xsl:text>
|
|
33
|
+
</xsl:template>
|
|
34
|
+
|
|
35
|
+
<xsl:template match="h1|h2|h3|h4|h5">
|
|
36
|
+
<xsl:apply-templates />
|
|
37
|
+
<xsl:text> </xsl:text>
|
|
38
|
+
</xsl:template>
|
|
39
|
+
|
|
14
40
|
<xsl:template match="p|div">
|
|
15
41
|
<xsl:choose>
|
|
16
42
|
<xsl:when test="starts-with(., '[') and substring(., string-length(.)) = ']'">
|
|
@@ -22,8 +48,7 @@
|
|
|
22
48
|
</xsl:otherwise>
|
|
23
49
|
</xsl:choose>
|
|
24
50
|
<!-- p and div tags must end with a newline -->
|
|
25
|
-
<xsl:text>
|
|
26
|
-
</xsl:text>
|
|
51
|
+
<xsl:text> </xsl:text>
|
|
27
52
|
</xsl:template>
|
|
28
53
|
|
|
29
54
|
<xsl:template match="table">
|
data/lib/slaw/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: slaw
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.
|
|
4
|
+
version: 6.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Greg Kempe
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-01-
|
|
11
|
+
date: 2020-01-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|