stepmod-utils 0.3.31 → 0.3.32

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: e7459842ad5de4eed3337c26d6267a5d85e6255f8a730a443d27dfd93ec76bbf
4
- data.tar.gz: e43d507c19b7027d0c22f6bb0e7fba544db9443a7a4df36162e3b8af3f2a28c7
3
+ metadata.gz: 0afdaf402a24b51d04d1e128027aad7192606c0861c8f7868bf7495fe4dac2b8
4
+ data.tar.gz: f55407b9bd0f6552788fb04908faa513eb337f243c61d1c71a86b16c0097b4b2
5
5
  SHA512:
6
- metadata.gz: a547cb2ee89f17a9d869dbc19aa6c74ee15a830c5bb88836166c4bf7d61532268508982e171ff318f2cb163b4041187d3e8638141a26e9d340433ebcb1b3ae58
7
- data.tar.gz: 61e26c2579d309560b5336868e1c75f3b18cca9cd036272f990e8d872118e779ff1b4969ac55c84c3f8fa9c39ae76d93cac86f8ac290d068f9acde029cd4f1ec
6
+ metadata.gz: 9f19dcf25d9a16f6be95e7bd26a5358bc392c34757ab691c50a20cc06c052f3bae136bc7ba7a3d77ba927dcadb1857c8bd860d99e141bce26d8f8701ce8245dd
7
+ data.tar.gz: 4119a6dcdbc640e6d9bfbbd1d23c983847dd2819a24c10e2539e9e69d4d654e61d349f609b9408180c47c3c19ef2d8c68fee0a424d30c53667023791dd575bce
@@ -9,7 +9,7 @@ module Stepmod
9
9
  def convert(node, state = {})
10
10
  content = treat_children(node, state.merge(already_strong: true))
11
11
  strong_tag = state[:non_flanking_whitesapce] ? '**' : '*'
12
- if content.strip.empty? || state[:already_strong]
12
+ if content.strip.empty? || state[:already_strong] || content_is_equation?(content)
13
13
  content
14
14
  else
15
15
  handle_express_escape_seq(
@@ -36,6 +36,10 @@ module Stepmod
36
36
  match = end_of_text ? /\($/ : /^\)/
37
37
  sibling&.text? && sibling.text =~ match
38
38
  end
39
+
40
+ def content_is_equation?(content)
41
+ content.match(/^\s*\[\[[^\]]*\]\]/) || content.match(/^\s*\[stem\]/)
42
+ end
39
43
  end
40
44
 
41
45
  ReverseAdoc::Converters.register :strong, Strong.new
@@ -1,5 +1,5 @@
1
1
  module Stepmod
2
2
  module Utils
3
- VERSION = "0.3.31".freeze
3
+ VERSION = "0.3.32".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stepmod-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.31
4
+ version: 0.3.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-23 00:00:00.000000000 Z
11
+ date: 2023-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby