prawndown 0.1.1 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 15f1c566a5138e7e6e6116a153a5322a37b82fdb95b3e6b729bf7b0e8911a782
4
- data.tar.gz: 4fa94d709d3c05059c07690f76f1211519723c838b066336f78cd8162da5743e
3
+ metadata.gz: 88359f7f3979707787791cdc6107950215ec028c8dac17526e8d6f0b47c73e6d
4
+ data.tar.gz: f69836edc22f7fe696dbc5d99fec57ca1b2ee6a30682618da658e1d03fbf21a3
5
5
  SHA512:
6
- metadata.gz: a49b17d69baa959894f0457e91659007f868a61ad1dc54d9b8ffd1938b07adbf9263263f0ae4fd387236bc7014048ad161cd3031d8caceb3d593d582725a6c75
7
- data.tar.gz: ba7ff76b1d419a9e69a86a563a432c82a5b3259079e0596ddfb2a001f23ac5739ee69050c057eeea398d64145b347bce5c1eb4fede190dc0d96647a30b166bb7
6
+ metadata.gz: 2b4dfd134a80c614c24d774e327fe2e9deaf951281fd0b31fbf2e37dabdc0d1fd4cb6497847381353fc5afc71fdb65cd9942fcc143e7719ae8645aa340ccfaa8
7
+ data.tar.gz: 0fc4a4e43d096e6c43c6348ff59465237e0ccfd5271f63d6d12f0c21716945693a7adcff585c1966b3eafd7e3acdb063c86072639fcd82d4a23eb5926e6c362a
@@ -6,6 +6,10 @@ For more information about changelogs, check
6
6
  [Keep a Changelog](http://keepachangelog.com) and
7
7
  [Vandamme](http://tech-angels.github.io/vandamme).
8
8
 
9
+ ## 0.1.2 - 2018.03.29
10
+
11
+ * [ENHANCEMENT] Improve documentation
12
+
9
13
  ## 0.1.1 - 2018.03.29
10
14
 
11
15
  * [ENHANCEMENT] Add generatable examples
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- prawndown (0.1.1)
4
+ prawndown (0.1.2)
5
5
  prawn (~> 2.0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -1,23 +1,23 @@
1
1
  # Prawndown
2
2
 
3
- A tiny Ruby gem to render a subset of Markdown in PDF files
3
+ A tiny Ruby gem to render a subset of Markdown in PDF files.
4
4
 
5
- Prawn is a Ruby library to generate PDF files. It supports text formatting trough its own HTML-esque language, which has tags for different formatting options like **bold**, _italic_ and [links](https://github.com/kaspermeyer/prawndown). Read more about the supported tags in the [Prawn documentation](http://prawnpdf.org/api-docs/2.0/Prawn/Text.html#text-instance_method).
5
+ Prawn is a Ruby library to generate PDF files. It supports text formatting trough its own HTML-esque language, which has tags for different formatting options like **bold**, _italic_, ~~strikethrough~~ and [links](https://github.com/kaspermeyer/prawndown). Read more about the supported tags in the [Prawn documentation](http://prawnpdf.org/api-docs/2.0/Prawn/Text.html#text-instance_method).
6
6
 
7
7
  ## Usage
8
8
 
9
- Prawndown extends Prawn with the `markdown` method. Use it to render Markdown in the document:
9
+ Prawndown extends Prawn with the `markdown` method. It accepts the same options as [`Prawn::Document#text`](http://prawnpdf.org/api-docs/2.0/Prawn/Text.html#text-instance_method).
10
+
11
+ Use it to render Markdown in the document:
10
12
 
11
13
  ```ruby
12
14
  Prawn::Document.generate('markdown.pdf') do
13
15
  markdown '# Welcome to Prawndown!'
14
- markdown '**Important:** We _hope_ you enjoy your stay!'
16
+ markdown '**Important:** We _hope_ you enjoy your stay!', color: 'AAAAAA'
15
17
  end
16
18
  ```
17
19
 
18
- It accepts the same options as [`Prawn::Document#text`](http://prawnpdf.org/api-docs/2.0/Prawn/Text.html#text-instance_method)
19
-
20
- If you prefer, you can also use the parser directly:
20
+ If prefered, the parser can also be invoked directly:
21
21
 
22
22
  ```ruby
23
23
  Prawndown::Parser.new('_Welcome_ to **Prawndown**').to_prawn #=> '<i>Welcome</i> to <b>Prawndown</b>'
@@ -25,6 +25,22 @@ Prawndown::Parser.new('_Welcome_ to **Prawndown**').to_prawn #=> '<i>Welcome</i>
25
25
 
26
26
  More thorough examples can be found under the `examples` folder. Run `rake examples` to generate the examples PDF.
27
27
 
28
+ ### Supported Markdown syntax
29
+ ```markdown
30
+ # Header 1
31
+ ## Header 2
32
+ ### Header 3
33
+ #### Header 4
34
+ ##### Header 5
35
+ ###### Header 6
36
+ _Italic_
37
+ *Italic*
38
+ __Bold__
39
+ **Bold**
40
+ ~~Strikethrough~~
41
+ [Links](https://github.com/kaspermeyer/prawndown)
42
+ ```
43
+
28
44
  *Note: Prawdown can't output the tags `<sub>`, `<sup>`, `<font>` and `<color>` as they lack native support in Markdown.*
29
45
 
30
46
  ## Installation
@@ -1,3 +1,3 @@
1
1
  module Prawndown
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prawndown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kasper Meyer