stepmod-utils 0.3.36 → 0.3.37

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: 0f1ebcec660e6d354c1b84750a92e0232c2428e0dd926f2aeb943f0ca3777f85
4
- data.tar.gz: 794ffb15bcdac0433bdc6a881a25c89ba7b60a7c30234d43b0cb08e479c1f94b
3
+ metadata.gz: ce39eaa361d527a10f6fc6f903f4fed05d61f4a9a41cb212b9a1540addc89a0d
4
+ data.tar.gz: 25191fe5b6fab1f15d1c3fcd3193a38adcf05a69918ab460a3c410eccedcefd0
5
5
  SHA512:
6
- metadata.gz: 7fa30f27168e5ff50c602d297e4f3a3f7eafde2eb1eca3c8006a719fef499350f2ce8901b04d6eebd9e0bf8b0156ef91b7a3477ccf120f16d66aad93f17f48d8
7
- data.tar.gz: 4fc47c6bedae4215005a7c47102b13a8185fdaaa2378847cd729d1d29f7b56ebf325fdaa95cddbcf0c93b668a79e6ea1025989828e3611bd0ddf06d34a139c5a
6
+ metadata.gz: 7196d637c4704b34e743680bcfad24232769c2c1919b9795f40e8ea634a0174f1b0b6a6a6dc9673354b717956bc3b65a346d27563abc462563c7b2f35b26eacd
7
+ data.tar.gz: a0f729d5d7bdebe7d707aa8153de5f9e04fdeb766fdb0e40516136f768a9ce959e76f504721dac1a03cf17efe6ca90ecf6aef3fb78c84742548e2fd5ed8adb64
@@ -18,9 +18,7 @@ module Stepmod
18
18
  treat(equation, state.merge(equation: true, already_italic: true))
19
19
  end
20
20
 
21
- content = if state[:equation] && !content.strip.empty?
22
- "ii(#{content.strip})"
23
- elsif content.strip.empty? || state[:already_italic]
21
+ content = if content.strip.empty? || state[:already_italic] || state[:equation]
24
22
  content
25
23
  else
26
24
  "#{content[/^\s*/]}_#{content.strip}_#{content[/\s*$/]}"
@@ -50,8 +50,7 @@ module Stepmod
50
50
  end
51
51
 
52
52
  def stem_converted(cloned_node, state)
53
- # We are now adding bb() or ii() for bold and italic respectively
54
- # remove_tags_not_in_context(cloned_node)
53
+ remove_tags_not_in_context(cloned_node)
55
54
  internal_content = treat_children(cloned_node, state.merge(equation: true))
56
55
  content = Stepmod::Utils::HtmlToAsciimath.new.call(internal_content)
57
56
  res = <<~TEMPLATE
@@ -20,9 +20,7 @@ module Stepmod
20
20
  treat(equation, state.merge(equation: true, already_strong: true))
21
21
  end
22
22
 
23
- content = if state[:equation]
24
- "bb(#{content.strip})"
25
- elsif content.strip.empty? || state[:already_strong]
23
+ content = if content.strip.empty? || state[:already_strong] || state[:equation]
26
24
  content
27
25
  else
28
26
  strong_tag = state[:non_flanking_whitesapce] ? '**' : '*'
@@ -1,5 +1,5 @@
1
1
  module Stepmod
2
2
  module Utils
3
- VERSION = "0.3.36".freeze
3
+ VERSION = "0.3.37".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.36
4
+ version: 0.3.37
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-14 00:00:00.000000000 Z
11
+ date: 2023-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby