hematite 0.1.12 → 0.1.13

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: 3bf0eaea458e2c4fba03dbcc759aaa04eb811832e1850b210d5e5a378fab2526
4
- data.tar.gz: 80dcbb081d5342365d4f119ffcb6f1dfd2be5b6533e23b0c23a18bde93709b54
3
+ metadata.gz: 5428a81a66f2c162d5db506a782443ab49ec31a2a2b67a02dec1cab941828768
4
+ data.tar.gz: 4a54bb491b61987364791315c6b4024b6fc019a3ba42f5488f43fb7f9c9ff704
5
5
  SHA512:
6
- metadata.gz: 23b88d8d1249320f6b4712e19d9a00f0a2bc0de0ef1e191aab371e56e019f38da43b8f26726e0e6d22a9a271bd647dc175bae4d58997222a04a4939700642908
7
- data.tar.gz: 916e067da5e530e001003b82f83d3a91241ba268823112662ff87102c16e5800c70b2d909d8e150c9a9c08017d9f6f4d7c5c76ac980f2faf4a8e22caa77bb625
6
+ metadata.gz: '08188e55d1fc0e2f342a186ac1cc57c0226fe7b138cdb5e2f622716b29f4a5cf41768220f9dafb3971d2081dfef5cbee1cb8f485cd6e041589b6a3472a63204f'
7
+ data.tar.gz: 1ddbfb8aa3b14052e0befc9e5dc6b59f1486705dc5f82033337a08a085368e27b6b1a51601db7e26b9578af0fafe74c0b3951a0e3fcda496ff5de23b35ad4b88
@@ -1,5 +1,5 @@
1
1
 
2
2
  @font-face {
3
3
  font-family: FoulisGreek;
4
- src: url({{ assets/fonts/FoulisGreek.ttf | absolute_path }});
4
+ src: url({{ "assets/fonts/FoulisGreek.ttf" | relative_url }});
5
5
  }
data/assets/js/search.mjs CHANGED
@@ -50,15 +50,25 @@ class Searcher {
50
50
  .replaceAll(/[&]ldquo;/g, '"')
51
51
  .replaceAll(/[&]rdquo;/g, '"')
52
52
  .replaceAll(/[&]amp;/g, "&")
53
+ // Remove the astrisks around **bolded** text
54
+ .replaceAll(/(\s|^)[*]{2}[^*]+[*]{2}(\s|$)/g, "$1$2$3")
55
+ // Remove the backticks around `text` that is code-formatted
56
+ .replaceAll(/(\s|^)[`]([^`]+)[`](\s|$)/g, "$1$2$3") // `
53
57
  .replaceAll(/\s+/g, ' ');
54
58
 
55
59
  }
56
60
 
61
+ filterQuery_(query) {
62
+ return query
63
+ .toLowerCase()
64
+ .replaceAll(/\s+/g, ' ');
65
+ }
66
+
57
67
  /// Get number of full matches for [query] in [text].
58
68
  /// @precondition [text] is already in a searchable (i.e.
59
69
  /// filtered) form.
60
70
  getNumberOfMatches(query, text) {
61
- query = query.toLowerCase();
71
+ query = this.filterQuery_(query);
62
72
 
63
73
  return text.toLowerCase().split(query).length - 1;
64
74
  }
@@ -68,7 +78,7 @@ class Searcher {
68
78
  /// is found.
69
79
  /// @precondition [text] is already in a searchable form.
70
80
  getIdxOfFirstMatch(query, text, startPos) {
71
- query = query.toLowerCase();
81
+ query = this.filterQuery_(query);
72
82
 
73
83
  return text.toLowerCase().indexOf(query, startPos);
74
84
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hematite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henry Heino