зеркало из https://github.com/github/markup.git
Merge pull request #1814 from github/jk-minified-upgrade-nokogiri
Update nokogiri, nokogiri-diff, rdoc, drop support for Ruby < 3
This commit is contained in:
Коммит
c15159bf64
|
@ -11,10 +11,10 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
ruby:
|
||||
- "2.4"
|
||||
- "2.5"
|
||||
- "2.6"
|
||||
- "2.7"
|
||||
- "3.0"
|
||||
- "3.1"
|
||||
- "3.2"
|
||||
- "3.3"
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
|
|
|
@ -4,4 +4,5 @@ pkg/
|
|||
Gemfile.lock
|
||||
.project
|
||||
.buildpath
|
||||
*~
|
||||
*~
|
||||
vendor/
|
||||
|
|
4
Gemfile
4
Gemfile
|
@ -1,17 +1,17 @@
|
|||
source "http://rubygems.org"
|
||||
gemspec
|
||||
|
||||
gem "posix-spawn", :platforms => :ruby
|
||||
gem "redcarpet", :platforms => :ruby
|
||||
gem "kramdown", :platforms => :jruby
|
||||
gem "RedCloth"
|
||||
# using a tag version here because 0.18.3 was not published by the author to encourage users to upgrade.
|
||||
# however we want to bump up to this version since this has a security patch
|
||||
gem "commonmarker", git: "https://github.com/gjtorikian/commonmarker.git", tag: "v0.18.3"
|
||||
gem "rdoc", "~>3.6"
|
||||
gem "rdoc", "~> 6.7.0"
|
||||
gem "org-ruby", "= 0.9.9"
|
||||
gem "creole", "~>0.3.6"
|
||||
gem "wikicloth", "=0.8.3"
|
||||
gem "twitter-text", "~> 1.14"
|
||||
gem "asciidoctor", "~> 2.0.5"
|
||||
gem "rake"
|
||||
gem "rexml"
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
## 5.0.0 - 2024-06-17
|
||||
* Drop support for Ruby versions < 3
|
||||
* Bump nokogiri from 1.8.1 to 1.16.5
|
||||
* Bump nokogiri-diff from 0.2.0 to 0.3.0
|
||||
* Bump rdoc from 3.6 to 6.7.0
|
||||
* Update CommandImplementation to better support large files (affecting RST and POD6 rendering)
|
||||
|
||||
## 4.0.2 - 2023-10-10
|
||||
* Add support for .mdx files in markdown
|
||||
|
||||
|
|
|
@ -13,8 +13,9 @@ Gem::Specification.new do |s|
|
|||
s.homepage = "https://github.com/github/markup"
|
||||
s.license = "MIT"
|
||||
|
||||
s.required_ruby_version = '>= 3.0.0'
|
||||
|
||||
s.files = `git ls-files`.split($\)
|
||||
s.files += Dir['vendor/**/*']
|
||||
s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
||||
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
||||
s.require_paths = %w[lib]
|
||||
|
@ -24,7 +25,7 @@ Gem::Specification.new do |s|
|
|||
s.add_development_dependency 'minitest', '~> 5.4', '>= 5.4.3'
|
||||
s.add_development_dependency 'html-pipeline', '~> 1.0'
|
||||
s.add_development_dependency 'sanitize', '>= 4.6.3'
|
||||
s.add_development_dependency 'nokogiri', '~> 1.8.1'
|
||||
s.add_development_dependency 'nokogiri-diff', '~> 0.2.0'
|
||||
s.add_development_dependency 'nokogiri', '~> 1.16.5'
|
||||
s.add_development_dependency 'nokogiri-diff', '~> 0.3.0'
|
||||
s.add_development_dependency "github-linguist", ">= 7.1.3"
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module GitHub
|
||||
module Markup
|
||||
VERSION = '4.0.2'
|
||||
VERSION = '5.0.0'
|
||||
Version = VERSION
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
begin
|
||||
require "posix-spawn"
|
||||
rescue LoadError
|
||||
require "open3"
|
||||
end
|
||||
|
||||
require "open3"
|
||||
require "github/markup/implementation"
|
||||
|
||||
|
||||
|
@ -39,28 +34,13 @@ module GitHub
|
|||
end
|
||||
end
|
||||
|
||||
if defined?(POSIX::Spawn)
|
||||
def execute(command, target)
|
||||
spawn = POSIX::Spawn::Child.new(*command, :input => target)
|
||||
if spawn.status.success?
|
||||
sanitize(spawn.out, target.encoding)
|
||||
else
|
||||
raise CommandError.new(spawn.err.strip)
|
||||
end
|
||||
end
|
||||
else
|
||||
def execute(command, target)
|
||||
output = Open3.popen3(*command) do |stdin, stdout, stderr, wait_thr|
|
||||
stdin.puts target
|
||||
stdin.close
|
||||
if wait_thr.value.success?
|
||||
stdout.readlines
|
||||
else
|
||||
raise CommandError.new(stderr.readlines.join('').strip)
|
||||
end
|
||||
end
|
||||
sanitize(output.join(''), target.encoding)
|
||||
end
|
||||
def execute(command, target)
|
||||
# capture3 blocks until both buffers are written to and the process terminates, but
|
||||
# it won't allow either buffer to fill up
|
||||
stdout, stderr, status = Open3.capture3(*command, stdin_data: target)
|
||||
|
||||
raise CommandError.new(stderr) unless status.success?
|
||||
sanitize(stdout, target.encoding)
|
||||
end
|
||||
|
||||
def sanitize(input, encoding)
|
||||
|
|
|
@ -66,6 +66,11 @@ class MarkupTest < Minitest::Test
|
|||
f.close_write
|
||||
f.read
|
||||
end
|
||||
|
||||
if ENV['UPDATE']
|
||||
File.open(expected_file, 'w') { |f| f.write actual }
|
||||
end
|
||||
|
||||
assert_html_equal expected, actual, <<message
|
||||
#{File.basename expected_file}'s contents are not html equal to output:
|
||||
#{diff}
|
||||
|
@ -106,7 +111,7 @@ message
|
|||
begin
|
||||
GitHub::Markup.render('README.java', "stop swallowing errors", symlink: false)
|
||||
rescue GitHub::Markup::CommandError => e
|
||||
assert_equal "failure message", e.message
|
||||
assert_equal "failure message", e.message.strip
|
||||
else
|
||||
fail "an exception was expected but was not raised"
|
||||
end
|
||||
|
|
|
@ -59,4 +59,4 @@ Here is some source code.
|
|||
<p>content</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,3 +1,3 @@
|
|||
<div>
|
||||
<p>This test verifies the author can disable the document title by adding <code>:!showtitle:</code> to the document header.</p>
|
||||
</div>
|
||||
</div>
|
|
@ -52,4 +52,4 @@ like links and unordered lists, are fine:</p>
|
|||
</ul>
|
||||
<p>Tabs work too:</p>
|
||||
<p>test "tabbed code", ->
|
||||
ok yes</p>
|
||||
ok yes</p>
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -15,18 +15,20 @@ Using Java from Ruby is JRuby's best-known feature---but you can also go in the
|
|||
|
||||
|
||||
<h1>
|
||||
<a name="Red_Bridge_JRuby_Embed"></a>Red Bridge (JRuby Embed)</h1>
|
||||
<a name="Red_Bridge_JRuby_Embed"></a>Red Bridge (JRuby Embed)
|
||||
</h1>
|
||||
|
||||
|
||||
|
||||
<p><tt>one-<two</tt>
|
||||
</p><pre>a-b</pre>
|
||||
|
||||
|
||||
<p>JRuby has long had a private embedding API, which was closely tied to the runtime's internals and therefore changed frequently as JRuby evolved. Since version 1.4, however, we have also provided a more stable public API, known as Red Bridge or JRuby Embed. Existing Java programs written to the <a href="DirectJRubyEmbedding">legacy API</a> should still work, but we strongly recommend Red Bridge for all new projects.
|
||||
</p>
|
||||
|
||||
<h2>
|
||||
<a name="Features_of_Red_Bridge"></a>Features of Red Bridge</h2>
|
||||
<a name="Features_of_Red_Bridge"></a>Features of Red Bridge
|
||||
</h2>
|
||||
|
||||
|
||||
<p>Red Bridge consists of two layers: Embed Core on the bottom, and implementations of <a href="http://www.jcp.org/en/jsr/detail?id=223" target="_blank">JSR223</a> and <a href="http://jakarta.apache.org/bsf/" target="_blank">BSF</a> on top. Embed Core is JRuby-specific, and can take advantage of much of JRuby's power. JSR223 and BSF are more general interfaces that provide a common ground across scripting languages.
|
||||
|
@ -46,14 +48,16 @@ For projects requiring multiple scripting languages, JSR223 is a good fit. Thoug
|
|||
</p>
|
||||
|
||||
<h1>
|
||||
<a name="Previous_Embedding_JRuby_Page"></a>Previous Embedding JRuby Page</h1>
|
||||
<a name="Previous_Embedding_JRuby_Page"></a>Previous Embedding JRuby Page
|
||||
</h1>
|
||||
|
||||
|
||||
<p>We recommend using Embed Core; however, if you're maintaining code that uses the old API, you can find its documentation on the <a href="JavaIntegration">legacy embedding</a><sup>[<a href="#cite_note-1">1</a>]</sup> page.
|
||||
</p>
|
||||
|
||||
<h1>
|
||||
<a name="References"></a>References</h1>
|
||||
<a name="References"></a>References
|
||||
</h1>
|
||||
|
||||
|
||||
<p></p><ol><li>
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
|
||||
<ul>
|
||||
|
||||
<li><p>Create a working compiler that understands the majority of the MATLAB/Octave programming language.</p>
|
||||
<li>
|
||||
<p>Create a working compiler that understands the majority of the MATLAB/Octave programming language.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -21,13 +22,16 @@
|
|||
|
||||
<ul>
|
||||
|
||||
<li><p>The first is the parser, located in the <code>src/parser/</code> directory. The parser proper is composed of three source files, <i>grammar.pg</i> which is a Perl6Grammar file, and <i>actions.pm</i> which is the associated actions file written in NQP, and <i>grammar-oper.pm</i> which is the operator precedence parser. In addition, several helper functions used by the parser are located in <code>src/internals</code>.</p>
|
||||
<li>
|
||||
<p>The first is the parser, located in the <code>src/parser/</code> directory. The parser proper is composed of three source files, <i>grammar.pg</i> which is a Perl6Grammar file, and <i>actions.pm</i> which is the associated actions file written in NQP, and <i>grammar-oper.pm</i> which is the operator precedence parser. In addition, several helper functions used by the parser are located in <code>src/internals</code>.</p>
|
||||
|
||||
</li>
|
||||
<li><p>The second component is the library of builtin functions in the <code>src/builtins/</code> directory. These functions are, currently, written primarily in PIR. Function names prefixed with an underscore are "private" functions for use with the parser. Other functions should have names which are the same as names for regular MATLAB or Octave functions, since they will be available to the HLL. These are also separated into different namespaces depending on visibility and utility.</p>
|
||||
<li>
|
||||
<p>The second component is the library of builtin functions in the <code>src/builtins/</code> directory. These functions are, currently, written primarily in PIR. Function names prefixed with an underscore are "private" functions for use with the parser. Other functions should have names which are the same as names for regular MATLAB or Octave functions, since they will be available to the HLL. These are also separated into different namespaces depending on visibility and utility.</p>
|
||||
|
||||
</li>
|
||||
<li><p>A number of library functions are written in M, or mostly M with some inline PIR code in <code>toolbox/</code>.</p>
|
||||
<li>
|
||||
<p>A number of library functions are written in M, or mostly M with some inline PIR code in <code>toolbox/</code>.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<h2>Subtitle</h2>
|
||||
<p>Example text.</p>
|
||||
<div>
|
||||
<p>Table of Contents</p>
|
||||
<p><a href="#top">Table of Contents</a></p>
|
||||
<ul>
|
||||
<li><a href="#header-2">Header 2</a></li>
|
||||
<li><a href="#field-list">Field list</a></li>
|
||||
|
@ -102,7 +102,8 @@ python.code('hello world')
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<a href="https://scan.coverity.com/projects/621"><img alt="Coverity Scan Build Status" src="https://scan.coverity.com/projects/621/badge.svg">
|
||||
<a href="https://scan.coverity.com/projects/621">
|
||||
<img alt="Coverity Scan Build Status" src="https://scan.coverity.com/projects/621/badge.svg">
|
||||
</a>
|
||||
<img alt="Coverity Scan Build Status" src="https://scan.coverity.com/projects/621/badge.svg">
|
||||
<a name="field-list"></a>
|
||||
|
@ -133,5 +134,4 @@ but no problem!</td>
|
|||
</table>
|
||||
<p><a href="mailto:someone@somewhere.org">someone@somewhere.org</a></p>
|
||||
<p>Press <kbd>Ctrl+C</kbd> to quit</p>
|
||||
|
||||
<p><strong>RAW HTML!</strong></p> p {color:blue;}
|
||||
<p><strong>RAW HTML!</strong></p> p {color:blue;}
|
|
@ -43,4 +43,4 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,5 +1,5 @@
|
|||
<div>
|
||||
<p>Contents</p>
|
||||
<p><a href="#top">Contents</a></p>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#introduction">1 Introduction</a><ul>
|
||||
|
@ -29,4 +29,4 @@ C source code.</p>
|
|||
</ul>
|
||||
<p><strong>pycparser</strong> is unique in the sense that it's written in pure Python - a very
|
||||
high level language that's easy to experiment with and tweak. To people familiar
|
||||
with Lex and Yacc, <strong>pycparser</strong>'s code will be simple to understand.</p>
|
||||
with Lex and Yacc, <strong>pycparser</strong>'s code will be simple to understand.</p>
|
Загрузка…
Ссылка в новой задаче