jekyll-antex 0.6.0 → 0.8.0

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: 0b87279a7608dbb4ca9eed439311e206cdb9fb66c978d6a0418275be1cf470fb
4
- data.tar.gz: ab8381af64763d4b9cb0eec82cc5ba46ce4a619a77a6fedbf07665b404eb3f6d
3
+ metadata.gz: 38cc80b080df5998a00550b7046fa6518e8842d4b225abe15ff21c39ced1290b
4
+ data.tar.gz: 064c607a0b8d825356b22fb6f6837526fd536ca64b13bfa0dc9cb054e9f945bb
5
5
  SHA512:
6
- metadata.gz: 29151511d7b8c79afaa5b23f16e666c30912f000d6d2608f4fb6461e99913ed818165f1b53140edccf85e48bf7fd48243768104ade14d9b152714330880c5fab
7
- data.tar.gz: 3a6cf462426c1cca9171b87b288fce058ba7d27d26316398a255e251e6dab4d176e3161866424e7dc17194fec85b46865a632c943af310d3c913647787b96ad6
6
+ metadata.gz: '082e533cae85f3ec1ac9f8db5a1d80cf0f1574b876e6e37cf5e874a1ab7787e1aa606af2979e170818743391d4e06e8c05486947d0426b70970da43c48463dc1'
7
+ data.tar.gz: '08e6bdd8202cf293cfe4b93cdcdfc8103464559196b1362d1b76f9f5e5f073194effa619085f9913ca366bad1eff24573dd5b9be4ea43c20aaa54fc44eaaca48'
data/README.md CHANGED
@@ -1,10 +1,18 @@
1
1
  # jekyll-antex
2
2
 
3
- [![Build Status](https://travis-ci.org/paolobrasolin/jekyll-antex.svg?branch=master)](https://travis-ci.org/paolobrasolin/jekyll-antex)
4
- [![Gem Version](https://badge.fury.io/rb/jekyll-antex.svg)](https://badge.fury.io/rb/jekyll-antex)
5
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
3
+ [![CI tests status badge][build-shield]][build-url]
4
+ [![Latest release badge][rubygems-shield]][rubygems-url]
5
+ [![License badge][license-shield]][license-url]
6
+ [![Maintainability badge][cc-maintainability-shield]][cc-maintainability-url]
7
+ [![Test coverage badge][cc-coverage-shield]][cc-coverage-url]
6
8
 
7
- [![Code Climate](https://codeclimate.com/github/paolobrasolin/jekyll-antex/badges/gpa.svg)](https://codeclimate.com/github/paolobrasolin/jekyll-antex)
8
- [![Test Coverage](https://codeclimate.com/github/paolobrasolin/jekyll-antex/badges/coverage.svg)](https://codeclimate.com/github/paolobrasolin/jekyll-antex/coverage)
9
- [![Inline docs](http://inch-ci.org/github/paolobrasolin/jekyll-antex.svg?branch=master)](http://inch-ci.org/github/paolobrasolin/jekyll-antex)
10
- [![Issue Count](https://codeclimate.com/github/paolobrasolin/jekyll-antex/badges/issue_count.svg)](https://codeclimate.com/github/paolobrasolin/jekyll-antex)
9
+ [build-shield]: https://img.shields.io/github/workflow/status/paolobrasolin/jekyll-antex/CI/main?label=tests&logo=github
10
+ [build-url]: https://github.com/paolobrasolin/jekyll-antex/actions/workflows/main.yml "CI tests status"
11
+ [rubygems-shield]: https://img.shields.io/gem/v/jekyll-antex?logo=ruby
12
+ [rubygems-url]: https://rubygems.org/gems/jekyll-antex "Latest release"
13
+ [license-shield]: https://img.shields.io/github/license/paolobrasolin/jekyll-antex
14
+ [license-url]: https://github.com/paolobrasolin/jekyll-antex/blob/main/LICENSE "License"
15
+ [cc-maintainability-shield]: https://img.shields.io/codeclimate/maintainability/paolobrasolin/jekyll-antex?logo=codeclimate
16
+ [cc-maintainability-url]: https://codeclimate.com/github/paolobrasolin/jekyll-antex "Maintainability"
17
+ [cc-coverage-shield]: https://img.shields.io/codeclimate/coverage/paolobrasolin/jekyll-antex?logo=codeclimate&label=test%20coverage
18
+ [cc-coverage-url]: https://codeclimate.com/github/paolobrasolin/jekyll-antex/coverage "Test coverage"
@@ -16,6 +16,7 @@ module Jekyll
16
16
 
17
17
  def validate_regexp!
18
18
  return if regexp.names.include? 'code'
19
+
19
20
  raise InvalidRegexp, <<~MESSAGE
20
21
  The regexp #{regexp.inspect} is missing the required named matching group "code".
21
22
  MESSAGE
@@ -14,6 +14,8 @@ module Jekyll
14
14
  end
15
15
 
16
16
  class Block < Liquid::Block
17
+ HASH_ATTR_NAME = 'data-antex-job-hash'
18
+
17
19
  def initialize(tag, markup, tokens)
18
20
  @markup = markup
19
21
  super
@@ -27,33 +29,64 @@ module Jekyll
27
29
  self.class.render_html(job)
28
30
  end
29
31
 
30
- private
31
-
32
32
  def self.render_html(job)
33
- img_tag = render_img_tag job
33
+ placeholder_tag = render_placeholder_tag job
34
34
  classes = job.options['classes'].join(' ')
35
- "<span class='#{classes}'>#{img_tag}</span>"
35
+ "<span class='#{classes}'>#{placeholder_tag}</span>"
36
36
  end
37
37
 
38
- def self.render_img_tag(job)
39
- "<img data-antex='#{job.hash}' src='#{img_url(job)}' />"
38
+ def self.replace_placeholders(content)
39
+ doc = Nokogiri::HTML.parse(content)
40
+ placeholders = doc.xpath("//object[@#{HASH_ATTR_NAME}]")
41
+ placeholders.each(&method(:replace_placeholder))
42
+ doc.to_s
40
43
  end
41
44
 
42
- def self.render_style_attribute(job_set_box, precision: 3)
43
- <<~IMG_TAG.gsub(/(\s\s+)/m, ' ').strip!
44
- style='margin: #{job_set_box.mt.round(precision)}ex
45
- #{job_set_box.mr.round(precision)}ex
46
- #{job_set_box.mb.round(precision)}ex
47
- #{job_set_box.ml.round(precision)}ex;
48
- height: #{job_set_box.th.round(precision)}ex;
49
- width: #{job_set_box.wd.round(precision)}ex;'
50
- IMG_TAG
45
+ def self.replace_placeholder(placeholder)
46
+ job = Jekyll::Antex.jobs[placeholder[HASH_ATTR_NAME]]
47
+ if job.options['inlining']
48
+ replace_placeholder_with_svg(placeholder)
49
+ else
50
+ replace_placeholder_with_img(placeholder)
51
+ end
51
52
  end
52
53
 
53
- def add_static_file(site, job)
54
- site.static_files << Jekyll::StaticFile.new(
55
- site, *self.class.static_file_paths(job)
56
- )
54
+ def self.replace_placeholder_with_img(placeholder)
55
+ job = Jekyll::Antex.jobs[placeholder[HASH_ATTR_NAME]]
56
+ style = render_style_attribute_value(job.set_box)
57
+ img = Nokogiri::XML::Node.new('img', placeholder.document)
58
+ src = Jekyll::Antex::Block.img_url(job)
59
+ img.set_attribute('src', src)
60
+ img.set_attribute('style', style)
61
+ placeholder.add_next_sibling(img)
62
+ placeholder.remove()
63
+ end
64
+
65
+ def self.replace_placeholder_with_svg(placeholder)
66
+ job = Jekyll::Antex.jobs[placeholder[HASH_ATTR_NAME]]
67
+ style = render_style_attribute_value(job.set_box)
68
+ path = File.read(job.files['svg'])
69
+ svg = Nokogiri::XML(path).at_css('svg')
70
+ svg.remove_attribute('width')
71
+ svg.remove_attribute('height')
72
+ svg.set_attribute('style', style)
73
+ placeholder.add_next_sibling(svg)
74
+ placeholder.remove()
75
+ end
76
+
77
+ def self.render_placeholder_tag(job)
78
+ "<object #{HASH_ATTR_NAME}='#{job.hash}'></object>"
79
+ end
80
+
81
+ def self.render_style_attribute_value(job_set_box, precision: 3)
82
+ <<~IMG_TAG.gsub(/(\s\s+)/m, ' ').strip!
83
+ margin: #{job_set_box.mt.round(precision)}ex
84
+ #{job_set_box.mr.round(precision)}ex
85
+ #{job_set_box.mb.round(precision)}ex
86
+ #{job_set_box.ml.round(precision)}ex;
87
+ height: #{job_set_box.th.round(precision)}ex;
88
+ width: #{job_set_box.wd.round(precision)}ex;
89
+ IMG_TAG
57
90
  end
58
91
 
59
92
  def self.img_url(job)
@@ -63,15 +96,24 @@ module Jekyll
63
96
  end
64
97
 
65
98
  def self.static_file_paths(job)
66
- work_dir_prefix = %r{^#{Regexp.escape job.dirs['work']}(?=\/|$)}
99
+ work_dir_prefix = %r{^#{Regexp.escape job.dirs['work']}(?=/|$)}
67
100
  # base, dir, name
68
101
  [
69
102
  job.dirs['work'],
70
- job.dirs['dest'].sub(work_dir_prefix, '').sub(%r{^\/}, ''),
103
+ job.dirs['dest'].sub(work_dir_prefix, '').sub(%r{^/}, ''),
71
104
  File.basename(job.files['svg'])
72
105
  ]
73
106
  end
74
107
 
108
+ private
109
+
110
+ def add_static_file(site, job)
111
+ return if job.options['inlining']
112
+ site.static_files << Jekyll::StaticFile.new(
113
+ site, *self.class.static_file_paths(job)
114
+ )
115
+ end
116
+
75
117
  def build_options(registers:, markup:)
76
118
  Jekyll::Antex::Options.build Jekyll::Antex::Options::DEFAULTS,
77
119
  registers[:site].config['antex'] || {},
@@ -27,13 +27,13 @@ module Jekyll
27
27
 
28
28
  def self.build_guarder(options)
29
29
  Jekyll::Antex::Stasher.new(
30
- options['guards'].values.reject { |value| false == value }.map(&Guard.method(:new))
30
+ options['guards'].values.reject { |value| value == false }.map(&Guard.method(:new))
31
31
  )
32
32
  end
33
33
 
34
34
  def self.build_aliaser(options)
35
35
  Jekyll::Antex::Stasher.new(
36
- options['aliases'].values.reject { |value| false == value }.map(&Alias.method(:new))
36
+ options['aliases'].values.reject { |value| value == false }.map(&Alias.method(:new))
37
37
  )
38
38
  end
39
39
 
@@ -142,3 +142,4 @@ aliases:
142
142
  /(?<code>\\[A-z]+)/x
143
143
  options:
144
144
  classes: [antex, inline]
145
+ inlining: false
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'yaml'
4
- require 'jekyll/utils'
4
+ require 'jekyll'
5
5
 
6
6
  module Jekyll
7
7
  module Antex
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module Antex
5
- VERSION = '0.6.0'
5
+ VERSION = '0.8.0'
6
6
  end
7
7
  end
data/lib/jekyll/antex.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'antex'
4
+ require 'nokogiri'
4
5
 
5
6
  require 'jekyll/antex/version'
6
7
  require 'jekyll/antex/dealiaser'
@@ -8,23 +9,33 @@ require 'jekyll/antex/block'
8
9
 
9
10
  module Jekyll
10
11
  module Antex
12
+ def self.gather_resources(site)
13
+ pages = site.pages
14
+ documents = site.collections.values.flat_map(&:docs)
15
+ [*pages, *documents].filter(&method(:allowed_resource?))
16
+ end
17
+
18
+ def self.allowed_resource?(resource)
19
+ # TODO: perhaps this should be configurable
20
+ File.fnmatch('*.{html,md}', resource.relative_path, File::FNM_EXTGLOB)
21
+ end
22
+
11
23
  def self.run_jobs
12
- jobs_count = Jekyll::Antex.jobs.count
13
- Jekyll.logger.writer << "Compiling TeX: ".rjust(20)
14
- Jekyll::Antex.jobs.values.each_with_index do |job, i|
15
- progress = "job " + i.next.to_s.rjust(jobs_count.to_s.length) + " of #{jobs_count} "
16
- Jekyll.logger.writer << progress
17
- job.run!
18
- Jekyll.logger.writer << "\b" * progress.length
24
+ jekyll_antex_jobs = Jekyll::Antex.jobs
25
+ jobs_count = jekyll_antex_jobs.count
26
+ jekyll_logger_writer = Jekyll.logger.writer
27
+ jekyll_logger_writer << 'Compiling TeX: '.rjust(20)
28
+ jekyll_antex_jobs.values.each_with_index do |job, index|
29
+ run_job(job, index, jobs_count, jekyll_logger_writer)
19
30
  end
20
- Jekyll.logger.writer << "#{jobs_count} jobs completed.\n"
31
+ jekyll_logger_writer << "#{jobs_count} jobs completed.\n"
21
32
  end
22
33
 
23
- def self.inject_style_attributes(output)
24
- output.gsub(/data-antex="(?<hash>.*?)"/) do
25
- job = Jekyll::Antex.jobs[Regexp.last_match[:hash]]
26
- Jekyll::Antex::Block.render_style_attribute(job.set_box)
27
- end
34
+ def self.run_job(job, index, jobs_count, jekyll_logger_writer)
35
+ progress = "job #{index.next.to_s.rjust(jobs_count.to_s.length)} of #{jobs_count} "
36
+ jekyll_logger_writer << progress
37
+ job.run!
38
+ jekyll_logger_writer << ("\b" * progress.length)
28
39
  end
29
40
  end
30
41
  end
@@ -32,20 +43,20 @@ end
32
43
  # NOTE: I'm conflicted, but regexp flags in yaml must be easy to use.
33
44
  SafeYAML::OPTIONS[:whitelisted_tags].push('!ruby/regexp')
34
45
 
35
- Jekyll::Hooks.register :site, :pre_render do
46
+ Jekyll::Hooks.register :site, :pre_render do |site|
36
47
  Jekyll::Antex.jobs = {}
37
- end
38
-
39
- # NOTE: we're not registering :posts since they are included in :documents.
40
- Jekyll::Hooks.register [:documents, :pages], :pre_render do |resource|
48
+ Jekyll::Antex.gather_resources(site).each do |resource|
41
49
  resource.content = Jekyll::Antex::Dealiaser.run(resource)
50
+ end
42
51
  end
43
52
 
44
53
  Liquid::Template.register_tag('antex', Jekyll::Antex::Block)
45
54
 
46
55
  Jekyll::Hooks.register :site, :post_render do |site|
47
56
  Jekyll::Antex.run_jobs
48
- [*site.pages, *site.documents].each do |resource|
49
- resource.output = Jekyll::Antex.inject_style_attributes(resource.output)
57
+ Jekyll::Antex.gather_resources(site).each do |resource|
58
+ # NOTE: skip unrendered resources e.g. when using --incremental
59
+ next if resource.output.nil?
60
+ resource.output = Jekyll::Antex::Block.replace_placeholders(resource.output)
50
61
  end
51
62
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-antex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paolo Brasolin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-11 00:00:00.000000000 Z
11
+ date: 2022-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: antex
@@ -16,140 +16,174 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.1'
19
+ version: 0.1.3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.1'
26
+ version: 0.1.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: jekyll
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '3'
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '5'
37
+ type: :runtime
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: '3'
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '5'
47
+ - !ruby/object:Gem::Dependency
48
+ name: kramdown-parser-gfm
29
49
  requirement: !ruby/object:Gem::Requirement
30
50
  requirements:
31
51
  - - "~>"
32
52
  - !ruby/object:Gem::Version
33
- version: '3.8'
53
+ version: 1.1.0
34
54
  type: :runtime
35
55
  prerelease: false
36
56
  version_requirements: !ruby/object:Gem::Requirement
37
57
  requirements:
38
58
  - - "~>"
39
59
  - !ruby/object:Gem::Version
40
- version: '3.8'
60
+ version: 1.1.0
61
+ - !ruby/object:Gem::Dependency
62
+ name: nokogiri
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '1'
68
+ type: :runtime
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '1'
41
75
  - !ruby/object:Gem::Dependency
42
76
  name: byebug
43
77
  requirement: !ruby/object:Gem::Requirement
44
78
  requirements:
45
79
  - - "~>"
46
80
  - !ruby/object:Gem::Version
47
- version: '10'
81
+ version: 11.1.3
48
82
  type: :development
49
83
  prerelease: false
50
84
  version_requirements: !ruby/object:Gem::Requirement
51
85
  requirements:
52
86
  - - "~>"
53
87
  - !ruby/object:Gem::Version
54
- version: '10'
88
+ version: 11.1.3
55
89
  - !ruby/object:Gem::Dependency
56
90
  name: guard
57
91
  requirement: !ruby/object:Gem::Requirement
58
92
  requirements:
59
93
  - - "~>"
60
94
  - !ruby/object:Gem::Version
61
- version: '2'
95
+ version: 2.18.0
62
96
  type: :development
63
97
  prerelease: false
64
98
  version_requirements: !ruby/object:Gem::Requirement
65
99
  requirements:
66
100
  - - "~>"
67
101
  - !ruby/object:Gem::Version
68
- version: '2'
102
+ version: 2.18.0
69
103
  - !ruby/object:Gem::Dependency
70
104
  name: guard-rspec
71
105
  requirement: !ruby/object:Gem::Requirement
72
106
  requirements:
73
107
  - - "~>"
74
108
  - !ruby/object:Gem::Version
75
- version: '4'
109
+ version: 4.7.3
76
110
  type: :development
77
111
  prerelease: false
78
112
  version_requirements: !ruby/object:Gem::Requirement
79
113
  requirements:
80
114
  - - "~>"
81
115
  - !ruby/object:Gem::Version
82
- version: '4'
116
+ version: 4.7.3
83
117
  - !ruby/object:Gem::Dependency
84
118
  name: reek
85
119
  requirement: !ruby/object:Gem::Requirement
86
120
  requirements:
87
121
  - - "~>"
88
122
  - !ruby/object:Gem::Version
89
- version: '4'
123
+ version: 6.0.6
90
124
  type: :development
91
125
  prerelease: false
92
126
  version_requirements: !ruby/object:Gem::Requirement
93
127
  requirements:
94
128
  - - "~>"
95
129
  - !ruby/object:Gem::Version
96
- version: '4'
130
+ version: 6.0.6
97
131
  - !ruby/object:Gem::Dependency
98
132
  name: rspec
99
133
  requirement: !ruby/object:Gem::Requirement
100
134
  requirements:
101
135
  - - "~>"
102
136
  - !ruby/object:Gem::Version
103
- version: '3'
137
+ version: 3.10.0
104
138
  type: :development
105
139
  prerelease: false
106
140
  version_requirements: !ruby/object:Gem::Requirement
107
141
  requirements:
108
142
  - - "~>"
109
143
  - !ruby/object:Gem::Version
110
- version: '3'
144
+ version: 3.10.0
111
145
  - !ruby/object:Gem::Dependency
112
146
  name: rubocop
113
147
  requirement: !ruby/object:Gem::Requirement
114
148
  requirements:
115
149
  - - "~>"
116
150
  - !ruby/object:Gem::Version
117
- version: '0.52'
151
+ version: 1.22.3
118
152
  type: :development
119
153
  prerelease: false
120
154
  version_requirements: !ruby/object:Gem::Requirement
121
155
  requirements:
122
156
  - - "~>"
123
157
  - !ruby/object:Gem::Version
124
- version: '0.52'
158
+ version: 1.22.3
125
159
  - !ruby/object:Gem::Dependency
126
160
  name: simplecov
127
161
  requirement: !ruby/object:Gem::Requirement
128
162
  requirements:
129
163
  - - "~>"
130
164
  - !ruby/object:Gem::Version
131
- version: '0.16'
165
+ version: 0.21.2
132
166
  type: :development
133
167
  prerelease: false
134
168
  version_requirements: !ruby/object:Gem::Requirement
135
169
  requirements:
136
170
  - - "~>"
137
171
  - !ruby/object:Gem::Version
138
- version: '0.16'
172
+ version: 0.21.2
139
173
  - !ruby/object:Gem::Dependency
140
174
  name: yard
141
175
  requirement: !ruby/object:Gem::Requirement
142
176
  requirements:
143
177
  - - "~>"
144
178
  - !ruby/object:Gem::Version
145
- version: '0.9'
179
+ version: 0.9.26
146
180
  type: :development
147
181
  prerelease: false
148
182
  version_requirements: !ruby/object:Gem::Requirement
149
183
  requirements:
150
184
  - - "~>"
151
185
  - !ruby/object:Gem::Version
152
- version: '0.9'
186
+ version: 0.9.26
153
187
  description: 'Jekyll-anTeX implements universal TeX support in Jekyll to embed and
154
188
  render arbitrary code using any engine and dialect. '
155
189
  email: paolo.brasolin@gmail.com
@@ -157,7 +191,6 @@ executables: []
157
191
  extensions: []
158
192
  extra_rdoc_files: []
159
193
  files:
160
- - LICENSE.txt
161
194
  - README.md
162
195
  - lib/jekyll/antex.rb
163
196
  - lib/jekyll/antex/alias.rb
@@ -181,15 +214,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
181
214
  requirements:
182
215
  - - ">="
183
216
  - !ruby/object:Gem::Version
184
- version: '2.5'
217
+ version: '2.6'
185
218
  required_rubygems_version: !ruby/object:Gem::Requirement
186
219
  requirements:
187
220
  - - ">="
188
221
  - !ruby/object:Gem::Version
189
222
  version: '0'
190
223
  requirements: []
191
- rubyforge_project:
192
- rubygems_version: 2.7.6
224
+ rubygems_version: 3.2.3
193
225
  signing_key:
194
226
  specification_version: 4
195
227
  summary: Universal TeX integration for Jekyll
data/LICENSE.txt DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2017 Paolo Brasolin
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.