github-markup 4.0.0 → 4.0.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
- SHA1:
3
- metadata.gz: d478e5b0587fafc728039bb362eb59b37e849cac
4
- data.tar.gz: 6b637a68b21097a1975f5c9c3a152aeee76c80f1
2
+ SHA256:
3
+ metadata.gz: 460b133e720fe08106c84643e1f7b1ca9e2878fbbd3c6cf5865a287f5e5bf92f
4
+ data.tar.gz: 16a8c4145ec42146e945c7cd4cfb3e7819701f099e5de43528b770087ce114b9
5
5
  SHA512:
6
- metadata.gz: 1f69437f7f93962727c3de22187f26cf9f127c6a994b4d7b6892b2a288d3923ece69fd0e206b899b1c9b7e22cad66ecde884477ea31e0253ebe80184ae7b823c
7
- data.tar.gz: 2b4d54324998b79ef4fd8254f0113419a805f8e2a3e8d7fd142b85d876fdc5e2a57ab9847fb5498b5ff1031204a085d054f27711b2b17b834d244d3e58e3595b
6
+ metadata.gz: 7c6307defe17fe273441c24a615b15840fdfd7a36e2e1585ef7ce84c6bcbf39c6f512a1a354541e713bb957f1f42771423fe06f354f37fe6cd1f4881357980dc
7
+ data.tar.gz: 57fd400b0a38e898eb27da5db1d0335eea594530cce97b5748bb70d6d8594d79e7ec90a72dbfe9e16e85957b93d3da42d7e2805dd57eec28f10dd9afb6153428
@@ -0,0 +1,58 @@
1
+ name: CI
2
+ on: [push, pull_request]
3
+
4
+ env:
5
+ JRUBY_OPTS: -Xcext.enabled=true
6
+
7
+ jobs:
8
+ build:
9
+ name: "Test / Ruby ${{ matrix.ruby }}"
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ matrix:
13
+ ruby:
14
+ - "2.4"
15
+ - "2.5"
16
+ - "2.6"
17
+ - "2.7"
18
+ fail-fast: false
19
+
20
+ steps:
21
+ - name: Checkout
22
+ uses: actions/checkout@v2
23
+ with:
24
+ fetch-depth: 10
25
+
26
+ - uses: ruby/setup-ruby@v1
27
+ with:
28
+ ruby-version: ${{ matrix.ruby }}
29
+ bundler-cache: true
30
+
31
+ - uses: actions/setup-python@v2
32
+ with:
33
+ # This should match lib/github/markups.rb GitHub::Markups::MARKUP_RST
34
+ python-version: '3.x'
35
+
36
+ - uses: actions/cache@v2
37
+ with:
38
+ path: ~/.cache/pip
39
+ key: ${{ runner.os }}-pip
40
+
41
+ - name: Install Perl dependencies
42
+ run: |
43
+ curl -1sLf \
44
+ 'https://dl.cloudsmith.io/public/nxadm-pkgs/rakudo-pkg/setup.deb.sh' \
45
+ | sudo -E bash
46
+ sudo apt-get update -qq
47
+ sudo apt-get install perl rakudo-pkg
48
+
49
+ curl -L http://cpanmin.us | perl - --sudo App::cpanminus
50
+ sudo cpanm --installdeps --notest Pod::Simple
51
+
52
+ - name: Install Python dependencies
53
+ run: python -m pip install docutils
54
+
55
+ - name: Run rake
56
+ run: |
57
+ export PATH=$PATH:/.perl6/bin:/opt/rakudo-pkg/bin
58
+ bundle exec rake
data/Gemfile CHANGED
@@ -5,7 +5,9 @@ gem "posix-spawn", :platforms => :ruby
5
5
  gem "redcarpet", :platforms => :ruby
6
6
  gem "kramdown", :platforms => :jruby
7
7
  gem "RedCloth"
8
- gem "commonmarker", "~> 0.18.1"
8
+ # using a tag version here because 0.18.3 was not published by the author to encourage users to upgrade.
9
+ # however we want to bump up to this version since this has a security patch
10
+ gem "commonmarker", git: "https://github.com/gjtorikian/commonmarker.git", tag: "v0.18.3"
9
11
  gem "rdoc", "~>3.6"
10
12
  gem "org-ruby", "= 0.9.9"
11
13
  gem "creole", "~>0.3.6"
data/HISTORY.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 4.0.1 - 2022-03-07
2
+ * Update to commonmarker 0.18.3; There isn't a version on RubyGems for this, so this is pointing to a [tag version on GitHub](https://github.com/gjtorikian/commonmarker/blob/v0.18.3/commonmarker.gemspec)
3
+
1
4
  ## 4.0.0 - 2021-03-31
2
5
 
3
6
  * Drop support for Python 2 in RST rendering [#1456](https://github.com/github/markup/pull/1456)
@@ -47,7 +47,7 @@ except:
47
47
  import codecs
48
48
  import io
49
49
 
50
- from docutils import nodes
50
+ from docutils import nodes, utils
51
51
  from docutils.parsers.rst import directives, roles
52
52
  from docutils.parsers.rst.directives.body import CodeBlock, Directive
53
53
  from docutils.core import publish_parts
@@ -76,6 +76,35 @@ from docutils import nodes
76
76
  original_behavior = False # Documents original docutils behavior
77
77
  github_display = True
78
78
 
79
+ def extract_extension_options(field_list, option_spec):
80
+ """
81
+ Overrides `utils.extract_extension_options` and inlines
82
+ `utils.assemble_option_dict` to make it ignore unknown options passed to
83
+ directives (i.e. ``:caption:`` for ``.. code-block:``).
84
+ """
85
+
86
+ dropped = set()
87
+ options = {}
88
+ for name, value in utils.extract_options(field_list):
89
+ convertor = option_spec.get(name)
90
+ if name in options or name in dropped:
91
+ raise utils.DuplicateOptionError('duplicate option "%s"' % name)
92
+
93
+ # silently drop unknown options as long as they are not duplicates
94
+ if convertor is None:
95
+ dropped.add(name)
96
+ continue
97
+
98
+ # continue as before
99
+ try:
100
+ options[name] = convertor(value)
101
+ except (ValueError, TypeError) as detail:
102
+ raise detail.__class__('(option: "%s"; value: %r)\n%s'
103
+ % (name, value, ' '.join(detail.args)))
104
+ return options
105
+
106
+ utils.extract_extension_options = extract_extension_options
107
+
79
108
  def unknown_directive(self, type_name):
80
109
  lineno = self.state_machine.abs_line_number()
81
110
  indented, indent, offset, blank_finish = \
data/lib/github-markup.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module GitHub
2
2
  module Markup
3
- VERSION = '4.0.0'
3
+ VERSION = '4.0.1'
4
4
  Version = VERSION
5
5
  end
6
6
  end
@@ -39,6 +39,12 @@ The UTF-8 quote character in this table used to cause python to go boom. Now doc
39
39
 
40
40
  python.code('hooray')
41
41
 
42
+ .. code:: python
43
+ :caption: An ignored Sphinx option
44
+ :made-up-option: An ignored made up option
45
+
46
+ python.code('hello world')
47
+
42
48
  .. doctest:: ignored
43
49
 
44
50
  >>> some_function()
@@ -9,7 +9,7 @@
9
9
  </ul>
10
10
  </div>
11
11
  <a name="header-2"></a>
12
- <h2><a href="#id1">Header 2</a></h2>
12
+ <h2><a href="#toc-entry-1">Header 2</a></h2>
13
13
  <ol>
14
14
  <li>Blah blah <code>code</code> blah</li>
15
15
  <li>More <code>code</code>, hooray</li>
@@ -64,6 +64,9 @@ A block of code
64
64
  python.code('hooray')
65
65
  </pre>
66
66
  <pre lang="python">
67
+ python.code('hello world')
68
+ </pre>
69
+ <pre lang="python">
67
70
  &gt;&gt;&gt; some_function()
68
71
  'result'
69
72
  </pre>
@@ -103,7 +106,7 @@ python.code('hooray')
103
106
  </a>
104
107
  <img alt="Coverity Scan Build Status" src="https://scan.coverity.com/projects/621/badge.svg">
105
108
  <a name="field-list"></a>
106
- <h2><a href="#id2">Field list</a></h2>
109
+ <h2><a href="#toc-entry-2">Field list</a></h2>
107
110
  <table frame="void" rules="none">
108
111
 
109
112
 
@@ -128,9 +131,7 @@ but no problem!</td>
128
131
  </tr>
129
132
  </tbody>
130
133
  </table>
131
-
132
134
  <p><a href="mailto:someone@somewhere.org">someone@somewhere.org</a></p>
133
-
134
135
  <p>Press <kbd>Ctrl+C</kbd> to quit</p>
135
136
 
136
- <p><strong>RAW HTML!</strong></p> p {color:blue;}
137
+ <p><strong>RAW HTML!</strong></p> p {color:blue;}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-markup
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Wanstrath
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-31 00:00:00.000000000 Z
11
+ date: 2022-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -138,9 +138,9 @@ extensions: []
138
138
  extra_rdoc_files: []
139
139
  files:
140
140
  - ".dockerignore"
141
+ - ".github/workflows/ci.yml"
141
142
  - ".gitignore"
142
143
  - ".kick"
143
- - ".travis.yml"
144
144
  - CODE_OF_CONDUCT.md
145
145
  - CONTRIBUTING.md
146
146
  - Dockerfile
@@ -205,7 +205,7 @@ homepage: https://github.com/github/markup
205
205
  licenses:
206
206
  - MIT
207
207
  metadata: {}
208
- post_install_message:
208
+ post_install_message:
209
209
  rdoc_options: []
210
210
  require_paths:
211
211
  - lib
@@ -220,9 +220,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
220
220
  - !ruby/object:Gem::Version
221
221
  version: '0'
222
222
  requirements: []
223
- rubyforge_project:
224
- rubygems_version: 2.6.11
225
- signing_key:
223
+ rubygems_version: 3.2.9
224
+ signing_key:
226
225
  specification_version: 4
227
226
  summary: The code GitHub uses to render README.markup
228
227
  test_files:
data/.travis.yml DELETED
@@ -1,27 +0,0 @@
1
- dist: trusty
2
- sudo: required
3
- language: ruby
4
- rvm:
5
- - 2.1.10
6
- - 2.2.7
7
- - 2.3.4
8
- - 2.4.1
9
- notifications:
10
- email: false
11
- git:
12
- depth: 10
13
- before_install:
14
- - sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 379CE192D401AB61
15
- - echo "deb https://dl.bintray.com/nxadm/rakudo-pkg-debs `lsb_release -cs` main" | sudo tee -a /etc/apt/sources.list.d/rakudo-pkg.list
16
- - sudo apt-get update -qq
17
- - sudo apt-get install perl rakudo-pkg
18
- - export PATH=$PATH:/.perl6/bin:/opt/rakudo-pkg/bin
19
- - curl -L http://cpanmin.us | perl - --sudo App::cpanminus
20
- - sudo cpanm --installdeps --notest Pod::Simple
21
- - sudo pip install docutils
22
- cache:
23
- - bundler
24
- - pip
25
- env:
26
- global:
27
- - "JRUBY_OPTS=-Xcext.enabled=true"