jektex 0.0.6 → 0.0.7

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: 476a24b916af7e71a30a60cd2476063fa2d627959060179104e8a41871c5d4ab
4
- data.tar.gz: 93243e4af6fea3e355f0cc4401e990cdb107f77c717b7e63d4902a172b56a7d0
3
+ metadata.gz: a6f411d475735a808e6fb495464688d7acca5fb2afa3d4f467612fc7d5308b7a
4
+ data.tar.gz: e322f027b1c7080553a9cf3e3d4145b49166f6d26e3c5502b3daf8a0ce61a0a5
5
5
  SHA512:
6
- metadata.gz: d0ae577416fec788441659e670f4e85c0b34c091c81f666ab1cd62f5a39b3500548efb4238f53d77f1ea0dd30bd3571f001aa418311dcf6786a70afbbd3d0e8c
7
- data.tar.gz: a7feff881708ffb27bffb76c2f00146c0bb4f7f4a90fe341ea88f121f1442ace72294596112f8c139e9a5628f4f14f0022e2f18dabe5a7e15e56e985d31c9d73
6
+ metadata.gz: 30af1bad450e61c9085975a37b6a2142084854d96201eb67e11cc9c80a21d9d3dbbc5894c82610f2cac7ab52b8272f3f5aae8b74bfa054480edbea9865ebbc48
7
+ data.tar.gz: 06c8353988adc7940217d6a75ca313cf72a65492db30ab5421567c822199dd6c4b57c86a28485a0b146de826b69c6c1ee80ccb00335277f0b23065881670949d
data/lib/jektex/jektex.rb CHANGED
@@ -62,13 +62,13 @@ end
62
62
 
63
63
  def escape_method( type, expression, doc_path )
64
64
  # detect if expression is in display mode
65
- is_in_display_mode? = type.downcase =~ /\[/
65
+ is_in_display_mode = type.downcase =~ /\[/
66
66
 
67
67
  # generate a hash from the math expression
68
- expression_hash = Digest::SHA2.hexdigest(string) + is_in_display_mode?.to_s
68
+ expression_hash = Digest::SHA2.hexdigest(expression) + is_in_display_mode.to_s
69
69
 
70
70
  # use it if it exists
71
- if($cache.has_key?(expression_hash) && !contains_updated_global_macro?(string))
71
+ if($cache.has_key?(expression_hash) && !contains_updated_global_macro?(expression))
72
72
  # check if expressin conains updated macro
73
73
  $count_newly_generated_expressions += 1
74
74
  print_stats
@@ -80,7 +80,7 @@ def escape_method( type, expression, doc_path )
80
80
  begin
81
81
  # render using ExecJS
82
82
  result = KATEX.call("katex.renderToString", expression,
83
- {is_in_display_mode?Mode: is_in_display_mode?, macros: $global_macros})
83
+ { displayMode: is_in_display_mode, macros: $global_macros})
84
84
  rescue SystemExit, Interrupt
85
85
  # save cache to disk
86
86
  File.open($path_to_cache, "w"){|to_file| Marshal.dump($cache, to_file)}
@@ -1,3 +1,3 @@
1
1
  module Jektex
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jektex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Černý