Add bin and edit workflow
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s

This commit is contained in:
2026-09-16 13:11:16 -06:00
parent c8ac4fcae5
commit 4cee170d66
17576 changed files with 895740 additions and 2 deletions
@@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
#
#--
# Copyright (C) 2019 Thomas Leitner <t_leitner@gmx.at>
#
# This file is part of kramdown-parser-gfm which is licensed under the MIT.
#++
#
require 'minitest/autorun'
require 'kramdown'
require 'kramdown/parser/gfm'
require 'yaml'
require 'tmpdir'
Encoding.default_external = 'utf-8'
class TestFiles < Minitest::Test
# Generate test methods for gfm-to-html conversion
Dir[__dir__ + '/testcases/**/*.text'].each do |text_file|
basename = text_file.sub(/\.text$/, '')
html_file = basename + '.html'
next unless File.exist?(html_file)
define_method('test_gfm_' + File.basename(text_file, '.*') + '_to_html') do
opts_file = basename + '.options'
opts_file = File.join(File.dirname(html_file), 'options') if !File.exist?(opts_file)
options = File.exist?(opts_file) ? YAML::load(File.read(opts_file)) : {auto_ids: false, footnote_nr: 1}
doc = Kramdown::Document.new(File.read(text_file), options.merge(input: 'GFM'))
assert_equal(File.read(html_file), doc.to_html)
end
end
end
@@ -0,0 +1,3 @@
<h1>header</h1>
<p>#no header</p>
@@ -0,0 +1,3 @@
# header
#no header
@@ -0,0 +1,14 @@
<pre><code>Three backticks
</code></pre>
<pre><code>Four backticks
</code></pre>
<pre><code>Unbalanced bottom heavy
</code></pre>
<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">language</span> <span class="n">no</span> <span class="n">space</span>
</code></pre></div></div>
<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">language</span> <span class="n">with</span> <span class="n">space</span>
</code></pre></div></div>
@@ -0,0 +1 @@
:enable_coderay: false
@@ -0,0 +1,19 @@
```
Three backticks
```
````
Four backticks
````
```
Unbalanced bottom heavy
``````
````ruby
language no space
````
```` ruby
language with space
````
@@ -0,0 +1,20 @@
<p>normal</p>
<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">require</span> <span class="s1">'kramdown'</span>
<span class="no">Kramdown</span><span class="o">::</span><span class="no">Document</span><span class="p">.</span><span class="nf">new</span><span class="p">(</span><span class="n">text</span><span class="p">).</span><span class="nf">to_html</span>
</code></pre></div></div>
<p>indent with tab</p>
<pre><code>```ruby
require 'kramdown'
Kramdown::Document.new(text).to_html
```
</code></pre>
<p>indent with 2 spaces</p>
<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">"hello"</span><span class="p">);</span>
</code></pre></div></div>
@@ -0,0 +1 @@
:enable_coderay: false
@@ -0,0 +1,21 @@
normal
```ruby
require 'kramdown'
Kramdown::Document.new(text).to_html
```
indent with tab
```ruby
require 'kramdown'
Kramdown::Document.new(text).to_html
```
indent with 2 spaces
```js
console.log("hello");
```
@@ -0,0 +1,3 @@
<p>one<br />
<em>two</em><br />
three</p>
@@ -0,0 +1,3 @@
one
_two_
three
@@ -0,0 +1,5 @@
<p>This is just a normal paragraph.<br />
Containing a manual line break above.</p>
<p>It was the best of times,<br />
it was the worst of times.</p>
@@ -0,0 +1 @@
:hard_wrap: false
@@ -0,0 +1,5 @@
This is just a normal paragraph.
Containing a manual line break above.
It was the best of times,\
it was the worst of times.
@@ -0,0 +1,27 @@
<h3 id="myid">test</h3>
<h3 id="variable_name">variable_name</h3>
<h3 id="abc-def-öúß">abc def öúß</h3>
<h3 id="192-abc-192">192 abc 192</h3>
<h3>;.;;</h3>
<h3 id="variable_name-1">variable_name</h3>
<h3 id="variable_name-2">variable_name</h3>
<h3 id="-1">;;</h3>
<h3 id="before--after-tab">before after tab</h3>
<h3 id="with-code">with <code>code</code></h3>
<h3 id="with-äspace">with  ä space</h3>
<h3 id="with-smart-quotes">With “smart” quotes</h3>
<h3 id="with--typographic--symbols">with — « typographic » … symbols</h3>
<h3 id="with-m5">with <script type="math/tex">m=5</script></h3>
@@ -0,0 +1 @@
:auto_ids: true
@@ -0,0 +1,27 @@
### test {#myid}
### variable_name
### abc def öúß
### 192 abc 192
### ;.;;
### variable_name
### variable_name
### ;;
### before after tab
### with `code`
### with &nbsp;&auml;&nbsp;space
### With "smart" quotes
### with --- << typographic >> ... symbols
### with $$m=5$$
@@ -0,0 +1,3 @@
<h1 id="hallo-header-1">Header 1</h1>
<h1 id="hallo-123">123</h1>
@@ -0,0 +1,2 @@
:auto_ids: true
:auto_id_prefix: hallo-
@@ -0,0 +1,3 @@
# Header 1
# 123
@@ -0,0 +1,3 @@
<h3 id="header-with---ndash">Header with --ndash</h3>
<h3 id="with------typographic---symbols">with --- &lt;&lt; typographic &gt;&gt; ... symbols</h3>
@@ -0,0 +1 @@
:gfm_quirks: [no_auto_typographic]
@@ -0,0 +1,3 @@
### Header with --ndash
### with --- << typographic >> ... symbols
@@ -0,0 +1,31 @@
<p>A<br />
- b</p>
<p>This is a list<br />
- or is it</p>
<p>blockquote<br />
&gt; text</p>
<p>header<br />
# text</p>
<p>codeblock fenced<br />
<code>
puts hello world
</code></p>
<ul>
<li>
<p>level 1<br />
some text</p>
<p>begin level 2<br />
* level 2<br />
* level 2</p>
</li>
</ul>
<h1 id="h1">h1</h1>
<p>## h2<br />
### h3</p>
@@ -0,0 +1 @@
:gfm_quirks: []
@@ -0,0 +1,27 @@
A
- b
This is a list
- or is it
blockquote
> text
header
# text
codeblock fenced
```
puts hello world
```
* level 1
some text
begin level 2
* level 2
* level 2
# h1
## h2
### h3
@@ -0,0 +1,38 @@
<p>A</p>
<ul>
<li>b</li>
</ul>
<p>This is a list</p>
<ul>
<li>or is it</li>
</ul>
<p>blockquote</p>
<blockquote>
<p>text</p>
</blockquote>
<p>header</p>
<h1>text</h1>
<p>codeblock fenced</p>
<pre><code>puts hello world
</code></pre>
<ul>
<li>
<p>level 1<br />
some text</p>
<p>begin level 2</p>
<ul>
<li>level 2</li>
<li>level 2</li>
</ul>
</li>
</ul>
<h1>h1</h1>
<h2>h2</h2>
<h3>h3</h3>
@@ -0,0 +1,27 @@
A
- b
This is a list
- or is it
blockquote
> text
header
# text
codeblock fenced
```
puts hello world
```
* level 1
some text
begin level 2
* level 2
* level 2
# h1
## h2
### h3
@@ -0,0 +1,33 @@
<p><del>This is a test</del></p>
<p>~<del>This is another test</del>~</p>
<p><del>This is yet another test</del>~</p>
<p>~~ This is a test of it NOT working ~~</p>
<p>~~<br />
This<br />
is<br />
a<br />
<strong>multiline</strong><br />
test<br />
~~</p>
<p>This is an <del><em>inline</em> <strong>strikethrough</strong></del> test</p>
<p>This is an ~~escaped~~ strikethrough.</p>
<p>This is a <del>strikethrough with a ~ in the middle</del></p>
<p>I <del>don’t even</del>~ have an extra tilde.</p>
<p>This should ~~not be struck.</p>
<p>This <del>is a complex <em>strike</em> through *test ~~with nesting</del> involved* here~~.</p>
<p>This <del>is a complex <em>strike</em> through *test</del> with apparent nesting <del>involved* here</del>.</p>
<p><del>中文</del></p>
<p><del>a</del></p>
@@ -0,0 +1,33 @@
~~This is a test~~
~~~This is another test~~~
~~This is yet another test~~~
~~ This is a test of it NOT working ~~
~~
This
is
a
**multiline**
test
~~
This is an ~~_inline_ **strikethrough**~~ test
This is an \~~escaped~~ strikethrough.
This is a ~~strikethrough with a ~ in the middle~~
I ~~don't even~~~ have an extra tilde.
This should ~~not be struck.
This ~~is a complex *strike* through *test ~~with nesting~~ involved* here~~.
This ~~is a complex *strike* through *test~~ with apparent nesting ~~involved* here~~.
~~中文~~
~~a~~
@@ -0,0 +1,40 @@
<p>unordered task list</p>
<ul class="task-list">
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled" />first ul task item</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled" checked="checked" />second ul task item</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled" checked="checked" />third ul task item</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled" />fourth ul task item [ ] next</li>
</ul>
<p>unordered list</p>
<ul>
<li>
<blockquote>
<p>first ul item</p>
</blockquote>
</li>
<li></li>
<li>
<pre><code>test
</code></pre>
</li>
<li>second ul item</li>
</ul>
<p>ordered list</p>
<ol>
<li>first ol item</li>
<li>second ol item</li>
</ol>
<p>ordered task list</p>
<ol class="task-list">
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled" />first ol task item</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled" checked="checked" />second ol task item</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled" checked="checked" />third ol task item</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled" />fourth ol task item</li>
</ol>
@@ -0,0 +1,26 @@
unordered task list
- [ ] first ul task item
- [x] second ul task item
- [X] third ul task item
- [ ] fourth ul task item [ ] next
unordered list
- > first ul item
-
-
test
- second ul item
ordered list
1. first ol item
2. second ol item
ordered task list
1. [ ] first ol task item
2. [x] second ol task item
3. [X] third ol task item
4. [ ] fourth ol task item
@@ -0,0 +1,4 @@
<p>This is just a normal paragraph. <br />
Containing a line break.</p>
<p>Another paragraph.</p>
@@ -0,0 +1,4 @@
This is just a normal paragraph.
Containing a line break.
Another paragraph.