stepmod-utils 0.3.31 → 0.3.33

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: e7459842ad5de4eed3337c26d6267a5d85e6255f8a730a443d27dfd93ec76bbf
4
- data.tar.gz: e43d507c19b7027d0c22f6bb0e7fba544db9443a7a4df36162e3b8af3f2a28c7
3
+ metadata.gz: d5f7acac9019851b25ebb422edd329f4eb94926619330d6e668f6b15043022ad
4
+ data.tar.gz: b78786ab56c61b2db0168e95e2bfdddeef597b95d61f2de7ef518a52c96ede8d
5
5
  SHA512:
6
- metadata.gz: a547cb2ee89f17a9d869dbc19aa6c74ee15a830c5bb88836166c4bf7d61532268508982e171ff318f2cb163b4041187d3e8638141a26e9d340433ebcb1b3ae58
7
- data.tar.gz: 61e26c2579d309560b5336868e1c75f3b18cca9cd036272f990e8d872118e779ff1b4969ac55c84c3f8fa9c39ae76d93cac86f8ac290d068f9acde029cd4f1ec
6
+ metadata.gz: 7b98ed913144b1c570d0ef21cb61ec40497862e12d46eed97edf781426f669674c8a915e17e557ab0ce1907a43e6e915f3402910f26cd54f1763fe8a7efdca62
7
+ data.tar.gz: 34e2019fe8b382a52452d21d6829a0868a86cacbe2796a470d3f21acfdc8bc5c23223a3a0ac517380a889397afa7193a98cb3f00745b9de2a7ae3257b09d3552
@@ -62,9 +62,11 @@ files.each do |file|
62
62
  source_path = File.join(stepmod_dir, "data", source)
63
63
  destination_path = File.join(File.dirname(file), destination)
64
64
 
65
+ puts "#{Thread.current.object_id}: Starting to copy file from #{source_path} to #{destination_path}"
65
66
  next if File.exist?(destination_path) || !File.exist?(source_path)
66
67
 
67
68
  FileUtils.cp(source_path, destination_path)
69
+ puts "#{Thread.current.object_id}: Done copying #{source_path} to #{destination_path}"
68
70
  end
69
71
 
70
72
  puts "#{Thread.current.object_id}: Done processing #{File.basename(file)} => #{annotated_file_path}."
@@ -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.33".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.33
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-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby