mdtohtml 0.0.3 → 0.0.4

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/mdtohtml +13 -19
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f0059ea6c5a409f01593a696b95493d5bd77b51b
4
- data.tar.gz: ae829631326956b285f4ce05a384a84a83331dd7
3
+ metadata.gz: b432d360dd17e2ea3826c36bfb46067e2ed08e75
4
+ data.tar.gz: 54d79a0e1954f4ac91557ab9d3cac5b036672afa
5
5
  SHA512:
6
- metadata.gz: 459ca0fe106c2db7fdc93588e061e21c948f3bcf892f0d422b727f627c46c1b52d4b5bb9d34b5904cd1852497151840ceca48ed2ce5b82a62e60715d7c9ab410
7
- data.tar.gz: 498399fd45406d7e75d5bf8b956bfe56278096949935516191a59697576c433de851ed227818286fa8c2e47fc577a1d6517400aa1d4aebb228829d51e3095232
6
+ metadata.gz: 9c3871ab10c7385a44ef6efcc0f0eb66db3e278ca881ccc22d7b8fbbed812ba7bde6fecc02dfa1865e9068361ef35579c3e58070613b72e90458bc9bb0a19312
7
+ data.tar.gz: 808316b51494575de5da9766ab321050bfef38c70b9f1061e6e0701a3c445c6971df9b57c196a65028e153cc70b56da33569726d54d8d711fb03b8ca339859ab
data/bin/mdtohtml CHANGED
@@ -3,7 +3,7 @@
3
3
  require 'redcarpet'
4
4
 
5
5
  def mdtohtml(file)
6
- markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true, tables: true)
6
+ markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, fenced_code_blocks: true, autolink: true, tables: true)
7
7
  out_file_content = markdown.render(File.read(file))
8
8
 
9
9
  basename = File.basename(file, '.*')
@@ -11,26 +11,20 @@ def mdtohtml(file)
11
11
  fp = File.open(out_file, "w")
12
12
 
13
13
  fp.write('
14
- <html>
15
- <head>
16
- <title>' + basename + '</title>
17
- <link rel="stylesheet" href="https://raw.githubusercontent.com/sindresorhus/github-markdown-css/gh-pages/github-markdown.css">
18
- <style>
19
- .markdown-body {
20
- min-width: 200px;
21
- max-width: 790px;
22
- margin: 0 auto;
23
- padding: 30px;
24
- }
25
- </style>
26
- </head>
27
- <body>
28
- <article class="markdown-body">')
14
+ <html>
15
+ <head>
16
+ <title>' + basename + '</title>
17
+ <link rel="stylesheet" href="https://raw.githubusercontent.com/githubutilities/mdtohtml/master/css/github-markdown.css">
18
+ </head>
19
+ <body>
20
+ <article class="markdown-body">'
21
+ )
29
22
  fp.write(out_file_content)
30
23
  fp.write('
31
- </article>
32
- </body>
33
- </html>')
24
+ </article>
25
+ </body>
26
+ </html>'
27
+ )
34
28
  # close the file to save the changes
35
29
  fp.close
36
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mdtohtml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - will