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 +4 -4
- data/exe/stepmod-annotate-all +2 -0
- data/lib/stepmod/utils/converters/strong.rb +5 -1
- data/lib/stepmod/utils/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5f7acac9019851b25ebb422edd329f4eb94926619330d6e668f6b15043022ad
|
4
|
+
data.tar.gz: b78786ab56c61b2db0168e95e2bfdddeef597b95d61f2de7ef518a52c96ede8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b98ed913144b1c570d0ef21cb61ec40497862e12d46eed97edf781426f669674c8a915e17e557ab0ce1907a43e6e915f3402910f26cd54f1763fe8a7efdca62
|
7
|
+
data.tar.gz: 34e2019fe8b382a52452d21d6829a0868a86cacbe2796a470d3f21acfdc8bc5c23223a3a0ac517380a889397afa7193a98cb3f00745b9de2a7ae3257b09d3552
|
data/exe/stepmod-annotate-all
CHANGED
@@ -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
|
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.
|
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-
|
11
|
+
date: 2023-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|