asciimath2unitsml 0.1.0 → 0.1.1

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: 97081f507478d1952ab2010cd4810efe745980341b9d4d1a420dbd8132be88b0
4
- data.tar.gz: ef63bceb0dc7b7c8dc8c40a1b6fa3795b02a3d0f0d9454be41e121d3a5199054
3
+ metadata.gz: '049ec45166f29cb157a85f9a5d3ac4ec6b1235ed1e673879623477b0b793c402'
4
+ data.tar.gz: 1671804ae7f17bc92268b7c77f7206d216f0c7b08a4318d7e9a3df116f45c47c
5
5
  SHA512:
6
- metadata.gz: ead9d484a747edf442ff9ce220d46e53f32ccfeada2653ca44e2ecac9a3da4ade854fbfe0dbb6d0120b87358e5cfae0dee3135e7798eed331b7cff25b3558a9c
7
- data.tar.gz: ed1aaf1967055b8ca4e270bef69b02b24ccef20fb075cc9f46acee7f5447e7c92e9c2f9bfd36646ee043b4f335dd4fd15920d958d429bdf89d155c5ddc14d729
6
+ metadata.gz: 6a4f6944f43e7a5336b648d8db1027bd93b4672d2ac22f90dc7277d4a6553959623db23b043bbd792cf9c4b351862980cee35b0828d44ac060ec21207fe7bf41
7
+ data.tar.gz: 8c8836120abac3f0a3fa49877efe3619c188af201e82d3afd37e56327063c624e629ac953b96eb5842cadf7186c354827773979d0291d94ab346ee528f699283
@@ -24,7 +24,7 @@ module Asciimath2UnitsML
24
24
  def multiplier(x)
25
25
  case x
26
26
  when :space
27
- { html: "&nbsp;", mathml: "<mo rspace='thickmathspace'>&#x2062;</mo>" }
27
+ { html: "&#xA0;", mathml: "<mo rspace='thickmathspace'>&#x2062;</mo>" }
28
28
  when :nospace
29
29
  { html: "", mathml: "<mo>&#x2062;</mo>" }
30
30
  else
@@ -1,3 +1,3 @@
1
1
  module Asciimath2UnitsML
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.1'.freeze
3
3
  end
data/spec/conv_spec.rb CHANGED
@@ -315,59 +315,59 @@ RSpec.describe Asciimath2UnitsML do
315
315
  1 "unitsml(kg*s^-2)"
316
316
  INPUT
317
317
  <math xmlns='http://www.w3.org/1998/Math/MathML'>
318
- <mn>1</mn>
319
- <mo rspace='thickmathspace'>&#x2062;</mo>
320
- <mrow xref='U_kg.s-2'>
321
- <mi mathvariant='normal'>kg</mi>
322
- <mo rspace='thickmathspace'>&#x2062;</mo>
323
- <msup>
324
- <mrow>
325
- <mi mathvariant='normal'>s</mi>
326
- </mrow>
327
- <mrow>
328
- <mo>&#x2212;</mo>
329
- <mn>2</mn>
330
- </mrow>
331
- </msup>
332
- </mrow>
333
- <unit xmlns='http://unitsml.nist.gov/2005' dimensionurl='#D_MT-2' xml:id='U_kg.s-2'>
334
- <unitsystem name='SI' type='SI_derived' xml:lang='en-US'/>
335
- <unitname xml:lang='en'>kg*s^-2</unitname>
336
- <unitsymbol type='HTML'>
337
- kg&#xA0;s
338
- <sup>&#x2212;2</sup>
339
- </unitsymbol>
340
- <unitsymbol type='MathML'>
341
- <math xmlns='http://www.w3.org/1998/Math/MathML'>
342
- <mrow>
343
- <mi mathvariant='normal'>kg</mi>
344
- <mo rspace='thickmathspace'>&#x2062;</mo>
345
- <msup>
346
- <mrow>
347
- <mi mathvariant='normal'>s</mi>
348
- </mrow>
349
- <mrow>
350
- <mo>&#x2212;</mo>
351
- <mn>2</mn>
352
- </mrow>
353
- </msup>
354
- </mrow>
355
- </math>
356
- </unitsymbol>
357
- <rootunits>
358
- <enumeratedrootunit unit='gram' prefix='k'/>
359
- <enumeratedrootunit unit='second' powernumerator='-2'/>
360
- </rootunits>
361
- </unit>
362
- <prefix xmlns='http://unitsml.nist.gov/2005' prefixbase='10' prefixpower='3' xml:id='NISTp10_3'>
363
- <prefixname xml:lang='en'>kilo</prefixname>
364
- <prefixsymbol type='ASCII'>k</prefixsymbol>
365
- </prefix>
366
- <dimension xmlns='http://unitsml.nist.gov/2005' xml:id='D_MT-2'>
367
- <mass symbol='M' powernumerator='1'/>
368
- <time symbol='T' powernumerator='-2'/>
369
- </dimension>
370
- </math>
318
+ <mn>1</mn>
319
+ <mo rspace='thickmathspace'>&#x2062;</mo>
320
+ <mrow xref='U_kg.s-2'>
321
+ <mi mathvariant='normal'>kg</mi>
322
+ <mo rspace='thickmathspace'>&#x2062;</mo>
323
+ <msup>
324
+ <mrow>
325
+ <mi mathvariant='normal'>s</mi>
326
+ </mrow>
327
+ <mrow>
328
+ <mo>&#x2212;</mo>
329
+ <mn>2</mn>
330
+ </mrow>
331
+ </msup>
332
+ </mrow>
333
+ <Unit xmlns='http://unitsml.nist.gov/2005' xml:id='U_kg.s-2' dimensionURL='#D_MT-2'>
334
+ <UnitSystem name='SI' type='SI_derived' xml:lang='en-US'/>
335
+ <UnitName xml:lang='en'>kg*s^-2</UnitName>
336
+ <UnitSymbol type='HTML'>
337
+ kg&#xA0;s
338
+ <sup>&#x2212;2</sup>
339
+ </UnitSymbol>
340
+ <UnitSymbol type='MathML'>
341
+ <math xmlns='http://www.w3.org/1998/Math/MathML'>
342
+ <mrow>
343
+ <mi mathvariant='normal'>kg</mi>
344
+ <mo rspace='thickmathspace'>&#x2062;</mo>
345
+ <msup>
346
+ <mrow>
347
+ <mi mathvariant='normal'>s</mi>
348
+ </mrow>
349
+ <mrow>
350
+ <mo>&#x2212;</mo>
351
+ <mn>2</mn>
352
+ </mrow>
353
+ </msup>
354
+ </mrow>
355
+ </math>
356
+ </UnitSymbol>
357
+ <RootUnits>
358
+ <EnumeratedRootUnit unit='gram' prefix='k'/>
359
+ <EnumeratedRootUnit unit='second' powerNumerator='-2'/>
360
+ </RootUnits>
361
+ </Unit>
362
+ <Prefix xmlns='http://unitsml.nist.gov/2005' prefixBase='10' prefixPower='3' xml:id='NISTp10_3'>
363
+ <PrefixName xml:lang='en'>kilo</PrefixName>
364
+ <PrefixSymbol type='ASCII'>k</PrefixSymbol>
365
+ </Prefix>
366
+ <Dimension xmlns='http://unitsml.nist.gov/2005' xml:id='D_MT-2'>
367
+ <Mass symbol='M' powerNumerator='1'/>
368
+ <Time symbol='T' powerNumerator='-2'/>
369
+ </Dimension>
370
+ </math>
371
371
  OUTPUT
372
372
  expect(xmlpp(Asciimath2UnitsML::Conv.new(multiplier: :nospace).Asciimath2UnitsML(<<~INPUT))).to be_equivalent_to xmlpp(<<~OUTPUT)
373
373
  1 "unitsml(kg*s^-2)"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciimath2unitsml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-18 00:00:00.000000000 Z
11
+ date: 2021-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciimath