serif 0.1.3 → 0.1.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.
data/README.md CHANGED
@@ -223,7 +223,7 @@ To disable archive pages, or configure the URL format, see the section on config
223
223
 
224
224
  ## Linking to archive pages
225
225
 
226
- To link to archive pages, there is a `site.archives` template variable available in all pages. The structure of `site.archives` is a nested map starting at years:
226
+ To link to archive pages, there is a `site.archive` template variable available in all pages. The structure of `site.archive` is a nested map starting at years:
227
227
 
228
228
  ```
229
229
  {
@@ -242,7 +242,7 @@ To link to archive pages, there is a `site.archives` template variable available
242
242
  }
243
243
  ```
244
244
 
245
- Using `site.archives`, you can iterate over `years`, then iterate over `months` and use `archive_url` to link to the archive page for that given month within the year.
245
+ Using `site.archive`, you can iterate over `years`, then iterate over `months` and use `archive_url` to link to the archive page for that given month within the year.
246
246
 
247
247
  # Configuration
248
248
 
@@ -299,4 +299,4 @@ The admin interface is intended to be a minimal place to focus on writing conten
299
299
  @import url("/css/style.css");
300
300
 
301
301
  /* more customisation below */
302
- ```
302
+ ```
@@ -1,10 +1,12 @@
1
1
  module Serif
2
2
  class MarkupRenderer < Redcarpet::Render::SmartyHTML
3
3
  def block_code(code, language)
4
- # bypass it all to avoid sticking higlihting markup on stuff with no language
4
+ # bypass it all to avoid sticking highlighting markup on stuff with no language.
5
+ #
6
+ # note that we add a new line after the initial ``` but not before the closing
7
+ # ``` because otherwise it introduces an extra \n.
5
8
  return Redcarpet::Markdown.new(Redcarpet::Render::SmartyHTML, fenced_code_blocks: true).render(%Q{```
6
- #{code}
7
- ```}).strip unless language
9
+ #{code}```}).strip unless language
8
10
 
9
11
  out = Pygments.highlight(code, lexer: language)
10
12
 
data/serif.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "serif"
3
- s.version = "0.1.3"
3
+ s.version = "0.1.4"
4
4
  s.authors = ["Adam Prescott"]
5
5
  s.email = ["adam@aprescott.com"]
6
6
  s.homepage = "https://github.com/aprescott/serif"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serif
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-21 00:00:00.000000000 Z
12
+ date: 2012-12-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake