jekyll-spaceship 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 419f539c81e8313699cf1e0798cdffe004a0f04f53845f3d72f6f7df18b072ed
4
- data.tar.gz: bad98cd8ba939cf7c370841f12f4d56b01d78df306cb7e5143f68a8f53055123
3
+ metadata.gz: c2a6f219ec49d2767f11891946203051ed55b82567d0021c929eb1831769e246
4
+ data.tar.gz: 80bdf4869aaf201752f791031b6730b0d3e86681cdb246f4855db960ec913a60
5
5
  SHA512:
6
- metadata.gz: d3973afe5641351d205e473ba2ae3f61bb9daf14aab803602fe6b0e94dc8cf0f14603f09e5f0704f94612e9bcd65deec972d5b5567840ee63c822bb62fe80f8f
7
- data.tar.gz: 647e60a7b13b26ea6053dc184f440d971aa4055a70ef7d6dc4d661061b513a28012f9815676f2ad75cd04030023e6d0dd3f4330336c0e6304d9fa7fe53279603
6
+ metadata.gz: b7ff25fd47603c5f3471db4d33cad716956ee41918fa5408fae35176025658122ee4cc567db6a68675d4c1e677d9f7b50a0e32ce12fb0eae1a3e8525503be8f0
7
+ data.tar.gz: ca6a2e4071c8eac5f8759778bb2c0e228a3b94369c16815fb150e8041b685a11e60f18dcd7f05afae3e9fbcf8075b5bfb61046248ff440b5dbefb80cedcef02e
data/README.md CHANGED
@@ -140,7 +140,12 @@ plugins:
140
140
  - jekyll-spaceship
141
141
  ```
142
142
 
143
- **💡 Tip:** Note that GitHub Pages runs in `safe` mode and only allows [a set of whitelisted plugins](https://pages.github.com/versions/). To use the gem in GitHub Pages, you need to build locally or use CI (e.g. [travis](https://travis-ci.org/), [github workflow](https://help.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow)) and deploy to your `gh-pages` branch. [Click here for more information.](https://jekyllrb.com/docs/continuous-integration/github-actions/) (e.g. [https://github.com/jeffreytse/jekyll-jeffreytse-blog](https://github.com/jeffreytse/jekyll-jeffreytse-blog))
143
+ **💡 Tip:** Note that GitHub Pages runs in `safe` mode and only allows [a set of whitelisted plugins](https://pages.github.com/versions/). To use the gem in GitHub Pages, you need to build locally or use CI (e.g. [travis](https://travis-ci.org/), [github workflow](https://help.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow)) and deploy to your `gh-pages` branch.
144
+
145
+ ### Additions
146
+
147
+ * Here is a GitHub Action named [jekyll-deploy-action](https://github.com/jeffreytse/jekyll-deploy-action) for Jekyll site deployment conveniently. 👍
148
+ * Here is a [Jekyll site](https://github.com/jeffreytse/jekyll-jeffreytse-blog) using Travis to build and deploy to GitHub Pages for your references.
144
149
 
145
150
  ## Configuration
146
151
 
@@ -158,7 +158,7 @@ module Jekyll::Spaceship
158
158
  if type == :code
159
159
  regex = /((`+)\s*(\w*)((?:.|\n)*?)\2)/
160
160
  elsif type == :math
161
- regex = /(?<=^|\n)[^\n\|]*(((?<!\\)\${1,2})[^\n]*\2)[^\n\|]*/
161
+ regex = /(((?<!\\)\${1,2})[^\n]*?\1)/
162
162
  end
163
163
  next if regex.nil?
164
164
  content.scan(regex) do |match_data|
@@ -8,7 +8,7 @@ module Jekyll::Spaceship
8
8
  def on_handle_markdown(content)
9
9
  # pre-handle reference-style links
10
10
  references = {}
11
- content.scan(/(\[(.*)\]:\s*(.*))/) do |match_data|
11
+ content.scan(/\n\s*(\[(.*)\]:\s*(\S+(\s+".*?")?))/) do |match_data|
12
12
  ref_name = match_data[1]
13
13
  ref_value = match_data[2]
14
14
  references[ref_name] = ref_value
@@ -33,9 +33,12 @@ module Jekyll::Spaceship
33
33
 
34
34
  # escape * and _ and $ etc.
35
35
  content.scan(/[^\n]*(?<!\\)\|[^\n]*/) do |result|
36
+ # skip for math expression within pipeline
37
+ next unless result
38
+ .gsub(/((?<!\\)\${1,2})[^\n]*?\1/, '')
39
+ .match(/(?<!\\)\|/)
36
40
  replace = result.gsub(
37
- /(?<!(?<!\\)\\)(\*|\$|\[|\(|\"|_)/,
38
- '\\\\\\\\\1')
41
+ /(?<!(?<!\\)\\)(\*|\$|\[|\(|\"|_)/, '\\\\\\\\\1')
39
42
  next if result == replace
40
43
  content = content.gsub(result, replace)
41
44
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module Spaceship
5
- VERSION = "0.8.2"
5
+ VERSION = "0.8.3"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-spaceship
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - jeffreytse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-02 00:00:00.000000000 Z
11
+ date: 2020-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll