html_toc 1.0.1 → 1.0.2
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
- metadata +12 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7fe0bd1ed85bd6019fdc3989a0f54f8bfb9d1560
|
|
4
|
+
data.tar.gz: 0e172e14bc8e9422d117a203451c4ce71363eab2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4717de16883ae3c3100b75e1c41e536c5b7b5d71017eb9099844c12cca80cd72e3fc331a42d4b41dc85028871fb96687df8ca79bab324df1242f489026d80dab
|
|
7
|
+
data.tar.gz: d71ebf5f843cde92e66e270638d6bd365fb638f2d4296adafa2ca56ecc8d177201cce3b81772155d9b804d18ce90ab995324cbbb2b5f2400002f3936d3caa69b
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: html_toc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Gregory Gadow
|
|
@@ -10,11 +10,17 @@ bindir: bin
|
|
|
10
10
|
cert_chain: []
|
|
11
11
|
date: 2014-12-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
|
-
description:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
description: "This gem is intended to be used in Rails pre-processing, after the page
|
|
14
|
+
has been generated but before it is delivered to the requestor. \n\nIt does a case-insensitive
|
|
15
|
+
search in the source text for [[toc]], which marks where the table of contents will
|
|
16
|
+
be placed. If the token is not found, the unmodified source is returned.\n\nIf the
|
|
17
|
+
token is found, it searches the text for header tags in a given range, and add an
|
|
18
|
+
id attribute if the header does not already have one. If no headers were found,
|
|
19
|
+
it will remove the token and return the modified source. \n\nIf there are headers,
|
|
20
|
+
a link is generated for each one, using the header's text and id for the link's
|
|
21
|
+
text and href. The links are wrapped in some divs, with classes and ids added so
|
|
22
|
+
the table of contents can be styled. The token is then replaced with the table of
|
|
23
|
+
contents, and the the modified source is returned.\n"
|
|
18
24
|
email: gpg@gregory-gadow.net
|
|
19
25
|
executables: []
|
|
20
26
|
extensions: []
|