slaw 6.1.0 → 6.2.0

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: 14d30911a95f4b2df4507204aaa258648e85b7ff5db433bee29a09e00db590cb
4
- data.tar.gz: 78daa536d0a071cffe417ad1725c5efc91eeadee0d586614c7367da91276c4d7
3
+ metadata.gz: eccd929903562e49bbd2ed7d10cd54733d4adce9e304aa94009e7c2ec8876b9a
4
+ data.tar.gz: ad3e092d320e446fb14c24b78ac85041da8f76c19c783ba559cee413f52d1b7e
5
5
  SHA512:
6
- metadata.gz: 2ad32f72ce446e4df09fd5ef9bf8bd613edec1e4f3444c8ca6814da455157c8c57abda56896faff5bb0a1cff6b0d3a8f054f364daaab86ee620fc2f83c26db28
7
- data.tar.gz: 4c87efed3e68c8b304a8ae41984d0ef5198d649f8f24d2c85d3053ccfed3fe787b8d4bcab29bd7cfe346131f350035d93ec24df449042e0e80bbf6ab49476f18
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>&#10;</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>&#10;</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>&#10;</xsl:text>
33
+ </xsl:template>
34
+
35
+ <xsl:template match="h1|h2|h3|h4|h5">
36
+ <xsl:apply-templates />
37
+ <xsl:text>&#10;&#10;</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>&#10;&#10;</xsl:text>
27
52
  </xsl:template>
28
53
 
29
54
  <xsl:template match="table">
data/lib/slaw/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Slaw
2
- VERSION = "6.1.0"
2
+ VERSION = "6.2.0"
3
3
  end
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.1.0
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-06 00:00:00.000000000 Z
11
+ date: 2020-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake