mathml2asciimath 0.0.8 → 0.0.12
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/.github/workflows/rake.yml +32 -0
- data/.gitignore +1 -0
- data/.hound.yml +3 -1
- data/.rubocop.yml +7 -7
- data/Gemfile +1 -2
- data/README.adoc +6 -5
- data/Rakefile +1 -1
- data/bin/m2a.rb +5 -7
- data/bin/rspec +1 -1
- data/lib/mathml2asciimath/m2a.rb +284 -252
- data/lib/mathml2asciimath/version.rb +1 -2
- data/mathml2asciimath.gemspec +7 -7
- data/spec/mathml_spec.rb +341 -251
- data/spec/spec_helper.rb +6 -7
- metadata +36 -41
- data/.github/workflows/macos.yml +0 -27
- data/.github/workflows/ubuntu.yml +0 -27
- data/.github/workflows/windows.yml +0 -30
- data/.rubocop.ribose.yml +0 -65
- data/.rubocop.tb.yml +0 -650
- data/Gemfile.lock +0 -108
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4776b5561cdaf83bd83995e4384681a823d77d674b177f00e6b4fbabfd8d9f30
|
4
|
+
data.tar.gz: e02d6d318ff13b6ee639b2e75f83739cfe9dfe7d4a7547e40e072ad18869e53a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 701d8b662fc157dfb7196840c16558637c9eb15a652dcdecee3258f89fe212ad79e4995a538bc1ce6299bd9f4805d70a05c12efe11b8461b77056c1acf5e4192
|
7
|
+
data.tar.gz: 9f0ca710ada1834f0f0e77e16c09f2b62480168528c5e54cdb347ca119ac40a49297d84806f97176606423c56ce99a982977bd681fce8a9a059ae00fcf04aecd
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
+
# See https://github.com/metanorma/cimas
|
3
|
+
name: rake
|
4
|
+
|
5
|
+
on:
|
6
|
+
push:
|
7
|
+
branches: [ master, main ]
|
8
|
+
tags: [ v* ]
|
9
|
+
pull_request:
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
rake:
|
13
|
+
name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
|
14
|
+
runs-on: ${{ matrix.os }}
|
15
|
+
continue-on-error: ${{ matrix.experimental }}
|
16
|
+
strategy:
|
17
|
+
fail-fast: false
|
18
|
+
matrix:
|
19
|
+
ruby: [ '3.0', '2.7', '2.6', '2.5' ]
|
20
|
+
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
21
|
+
experimental: [ false ]
|
22
|
+
steps:
|
23
|
+
- uses: actions/checkout@v2
|
24
|
+
with:
|
25
|
+
submodules: true
|
26
|
+
|
27
|
+
- uses: ruby/setup-ruby@v1
|
28
|
+
with:
|
29
|
+
ruby-version: ${{ matrix.ruby }}
|
30
|
+
bundler-cache: true
|
31
|
+
|
32
|
+
- run: bundle exec rake
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
.rubocop-https--*
|
data/.hound.yml
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
#
|
2
|
-
# https://github.com/
|
3
|
-
# All project-specific additions and overrides should be specified in this file.
|
4
|
-
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
+
# See https://github.com/metanorma/cimas
|
5
3
|
inherit_from:
|
6
4
|
- https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
|
5
|
+
|
6
|
+
# local repo-specific modifications
|
7
|
+
# ...
|
8
|
+
|
7
9
|
AllCops:
|
8
|
-
TargetRubyVersion: 2.
|
9
|
-
Rails:
|
10
|
-
Enabled: true
|
10
|
+
TargetRubyVersion: 2.5
|
data/Gemfile
CHANGED
data/README.adoc
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
= mathml2asciimath
|
2
2
|
|
3
3
|
image:https://img.shields.io/gem/v/mathml2asciimath.svg["Gem Version", link="https://rubygems.org/gems/mathml2asciimath"]
|
4
|
-
image:https://
|
5
|
-
image:https://
|
6
|
-
image:https://
|
7
|
-
image:https://
|
8
|
-
image:https://img.shields.io/github/
|
4
|
+
image:https://github.com/plurimath/mathml2asciimath/workflows/ubuntu/badge.svg["Ubuntu Build Status", link="https://github.com/plurimath/mathml2asciimath/actions?query=workflow%3Aubuntu"]
|
5
|
+
image:https://github.com/plurimath/mathml2asciimath/workflows/macos/badge.svg["OSX Build Status", link="https://github.com/plurimath/mathml2asciimath/actions?query=workflow%3Amacos"]
|
6
|
+
image:https://github.com/plurimath/mathml2asciimath/workflows/windows/badge.svg["Windows Build Status", link="https://github.com/plurimath/mathml2asciimath/actions?query=workflow%3Awindows"]
|
7
|
+
image:https://codeclimate.com/github/plurimath/mathml2asciimath/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/plurimath/mathml2asciimath"]
|
8
|
+
image:https://img.shields.io/github/issues-pr-raw/plurimath/mathml2asciimath.svg["Pull Requests", link="https://github.com/plurimath/mathml2asciimath/pulls"]
|
9
|
+
image:https://img.shields.io/github/commits-since/plurimath/mathml2asciimath/latest.svg["Commits since latest",link="https://github.com/plurimath/mathml2asciimath/releases"]
|
9
10
|
|
10
11
|
Ruby gem to convert MathML into AsciiMath
|
11
12
|
|
data/Rakefile
CHANGED
data/bin/m2a.rb
CHANGED
@@ -5,13 +5,11 @@ while a = gets
|
|
5
5
|
matches = a.split(%r{(<math.*?</math>)})
|
6
6
|
out = ""
|
7
7
|
matches.each do |x|
|
8
|
-
if /<math/.match x
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
out += if /<math/.match? x
|
9
|
+
MathML2AsciiMath.m2a(x)
|
10
|
+
else
|
11
|
+
x
|
12
|
+
end
|
13
13
|
end
|
14
14
|
print out
|
15
15
|
end
|
16
|
-
|
17
|
-
|
data/bin/rspec
CHANGED