satanic_pages 0.3.1 → 0.3.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: e5264574e1f6d505ba74598a648526837b38b6b0d499cd89c9886936b8fcacbc
4
- data.tar.gz: c7f5f44b3d10490aa7d54cc7418001cc99bb4818376af7cee3d9330ef0539ab3
3
+ metadata.gz: 59bb9126023c975925d2568017fdd9ca4ed3681d278b6c255737500f8e78ba0b
4
+ data.tar.gz: 46bf1d308946b318b655ee1a6e3bd11fcaf348af3a5004ea5dc4a6f3b7bc4571
5
5
  SHA512:
6
- metadata.gz: 1e2803848dd5f2566d400c91e7915d2b745d388f5f345ed00073fe763bbc71896de0e930cd7206e17da873925b80aeadd02a7e7a40ea00ca33c2ef48d0ddc421
7
- data.tar.gz: 0c0285c9ce293391d743d636a2fbec4cc2f7317d254bda9ee09123b71d4401196f1da37b3899c3cb529fa6018154fee04b598b91be9c539b0d4ed071dfaf210a
6
+ metadata.gz: 6b6af6c8d30b6bc4522f9fc78614adaa88d98736df8be22162a10ce45df4204d7f67ccd818740f4396e021017bfda284e25a6681ff46c521c4904892d696228d
7
+ data.tar.gz: 94e3cd2e515d5fe9c64641b7e2f2a6b151368d956c9207c7d37472d309939b735e75cd20ab2c7b3cabf8a0df8bc1eed8c05b9faf90a545a9a12deeadce8e055b
@@ -3,13 +3,15 @@
3
3
  module SatanicPages
4
4
  class MarkdownTemplateHandler < MarkdownRails::Renderer::Rails
5
5
  include Redcarpet::Render::SmartyPants
6
+ TEMPLATE_ANNOTATION_REGEX =
7
+ /<!\p{Pd}{1,2}\s*(BEGIN|END)\s+.*?\s*\p{Pd}{1,2}>/m
6
8
 
7
9
  def preprocess(source)
8
10
  frontmatter, rest = Frontmatter.parse(source)
9
11
 
10
12
  render(inline: rest, handler: :erb, locals: {data: frontmatter})
11
- # Remove template comments
12
- .gsub(/<!-- (BEGIN|END) (.*) -->/, "")
13
+ # Remove template comments (including SmartyPants converted dashes)
14
+ .gsub(TEMPLATE_ANNOTATION_REGEX, "")
13
15
  # Force HTML tags to be inline
14
16
  .gsub(/<[^>]*?>/) { |tag| tag.gsub(/\n\s*/, " ") }
15
17
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SatanicPages
4
- VERSION = "0.3.1"
4
+ VERSION = "0.3.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: satanic_pages
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikkel Malmberg
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
77
  - !ruby/object:Gem::Version
78
78
  version: '0'
79
79
  requirements: []
80
- rubygems_version: 3.6.8
80
+ rubygems_version: 4.0.6
81
81
  specification_version: 4
82
82
  summary: An embeddable static pages engine for Rails apps and the devil
83
83
  test_files: []