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
+46
View File
@@ -0,0 +1,46 @@
# -*- coding: utf-8; frozen_string_literal: true -*-
#
#--
# Copyright (C) 2009-2026 Thomas Leitner <t_leitner@gmx.at>
#
# This file is part of kramdown which is licensed under the MIT.
#++
#
$:.unshift File.dirname(__FILE__) + '/../lib'
require 'kramdown'
require 'test/unit/assertions'
require 'yaml'
include Test::Unit::Assertions
arg = ARGV[0] || File.join(File.dirname(__FILE__), 'testcases')
arg = if File.directory?(arg)
File.join(arg, '**/*.text')
else
arg + '.text'
end
width = ((size = `stty size 2>/dev/null`).length > 0 ? size.split.last.to_i : 72) rescue 72
width -= 8
fwidth = 0
Dir[arg].each {|f| fwidth = [fwidth, f.length + 10].max }.each do |file|
print(('Testing ' + file + ' ').ljust([fwidth, width].min))
$stdout.flush
html_file = file.sub('.text', '.html')
opts_file = file.sub('.text', '.options')
opts_file = File.join(File.dirname(file), 'options') unless File.exist?(opts_file)
options = File.exist?(opts_file) ? YAML.safe_load(File.read(opts_file)) : {auto_ids: false, footnote_nr: 1}
doc = Kramdown::Document.new(File.read(file), options)
begin
assert_equal(File.read(html_file), doc.to_html)
puts 'PASSED'
rescue StandardError
puts ' FAILED'
puts $!.message if $VERBOSE
puts $!.backtrace if $DEBUG
end
puts "Warnings:\n" + doc.warnings.join("\n") if !doc.warnings.empty? && $VERBOSE
end
+313
View File
@@ -0,0 +1,313 @@
# -*- coding: utf-8; frozen_string_literal: true -*-
#
#--
# Copyright (C) 2009-2026 Thomas Leitner <t_leitner@gmx.at>
#
# This file is part of kramdown which is licensed under the MIT.
#++
#
require 'minitest/autorun'
require 'kramdown'
require 'yaml'
require 'tmpdir'
require 'open3'
begin
require 'kramdown/converter/syntax_highlighter/rouge'
Kramdown::Converter::SyntaxHighlighter::Rouge.formatter_class.send(:define_method, :format) do |tokens, &b|
super(tokens, &b).sub(/<\/code><\/pre>\n?/, "</code></pre>\n")
end
# custom formatter for tests
module Rouge
module Formatters
class RougeHTMLFormatters < Kramdown::Converter::SyntaxHighlighter::Rouge.formatter_class
tag 'rouge_html_formatters'
def stream(tokens, &b)
yield %(<div class="custom-class">)
super
yield %(</div>)
end
end
end
end
rescue LoadError, SyntaxError, NameError
end
Encoding.default_external = 'utf-8'
class TestFiles < Minitest::Test
EXCLUDE_KD_FILES = [].compact
# Generate test methods for kramdown-to-xxx conversion
Dir[File.dirname(__FILE__) + '/testcases/**/*.text'].each do |text_file|
next if EXCLUDE_KD_FILES.any? {|f| text_file =~ /#{f}/ }
basename = text_file.sub(/\.text$/, '')
opts_file = text_file.sub(/\.text$/, '.options')
(Dir[basename + ".*"] - [text_file, opts_file]).each do |output_file|
output_format = File.extname(output_file)[1..-1]
next unless Kramdown::Converter.const_defined?(output_format[0..0].upcase + output_format[1..-1])
define_method('test_' + text_file.tr('.', '_') + "_to_#{output_format}") do
opts_file = File.join(File.dirname(text_file), 'options') unless 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)
assert_equal(File.read(output_file), doc.send("to_#{output_format}"))
end
end
end
# Generate test methods for html-to-{html,kramdown} conversion
`tidy -v 2>&1`
if $?.exitstatus != 0
warn("Skipping html-to-{html,kramdown} tests because tidy executable is missing")
else
EXCLUDE_HTML_FILES = [
'test/testcases/block/06_codeblock/whitespace.html', # bc of span inside pre
'test/testcases/block/09_html/simple.html', # bc of xml elements
'test/testcases/span/03_codespan/highlighting.html', # bc of span elements inside code element
'test/testcases/block/04_header/with_auto_ids.html', # bc of auto_ids=true option
'test/testcases/block/04_header/header_type_offset.html', # bc of header_offset option
'test/testcases/block/06_codeblock/rouge/simple.html', # bc of double surrounding <div>
'test/testcases/block/06_codeblock/rouge/multiple.html', # bc of double surrounding <div>
'test/testcases/block/06_codeblock/highlighting.html', # bc of span elements inside code element
'test/testcases/block/06_codeblock/highlighting-opts.html', # bc of span elements inside code element
'test/testcases/block/06_codeblock/guess_lang_css_class.html', # bc of double surrounding <div>
'test/testcases/block/12_extension/options3.html', # bc of rouge
'test/testcases/block/14_table/empty_tag_in_cell.html', # bc of tidy
'test/testcases/block/15_math/mathjax_preview.html', # bc of mathjax preview
'test/testcases/block/15_math/mathjax_preview_simple.html', # bc of mathjax preview
'test/testcases/block/15_math/mathjax_preview_as_code.html', # bc of mathjax preview
'test/testcases/span/05_html/mark_element.html', # bc of tidy
'test/testcases/block/09_html/xml.html', # bc of tidy
'test/testcases/span/05_html/xml.html', # bc of tidy
'test/testcases/block/04_header/with_header_links.html', # because of header_links option
].compact
EXCLUDE_HTML_TEXT_FILES = [
'test/testcases/block/09_html/parse_as_span.htmlinput',
'test/testcases/block/09_html/parse_as_raw.htmlinput',
].compact
Dir[File.dirname(__FILE__) + '/testcases/**/*.{html,htmlinput}'].each do |html_file|
next if EXCLUDE_HTML_FILES.any? {|f| html_file =~ /#{f}/ }
out_files = []
out_files << [(html_file =~ /\.htmlinput$/ ? html_file.sub(/input$/, '') : html_file), :to_html]
if html_file =~ /\.htmlinput$/ && EXCLUDE_HTML_TEXT_FILES.none? {|f| html_file =~ /#{f}/ }
out_files << [html_file.sub(/htmlinput$/, 'text'), :to_kramdown]
end
out_files.select {|f, _| File.exist?(f) }.each do |out_file, out_method|
define_method('test_' + html_file.tr('.', '_') + "_to_#{File.extname(out_file)}") do
opts_file = html_file.sub(/\.html(input)?$/, '.options')
opts_file = File.join(File.dirname(html_file), 'options') unless 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(html_file), options.merge(input: 'html'))
if out_method == :to_html
assert_equal(tidy_output(File.read(out_file)), tidy_output(doc.send(out_method)))
else
assert_equal(File.read(out_file), doc.send(out_method))
end
end
end
end
end
def tidy_output(out)
cmd = "tidy -q --doctype omit -utf8"
result, error, status = Open3.capture3(cmd, stdin_data: out)
if status.exitstatus == 2
raise "Problem using tidy: #{error}"
end
result
end
# Generate test methods for text-to-latex conversion and compilation
`latex -v 2>&1`
if $?.exitstatus != 0
warn("Skipping latex compilation tests because latex executable is missing")
else
EXCLUDE_LATEX_FILES = [
'test/testcases/span/01_link/image_in_a.text', # bc of image link
'test/testcases/span/01_link/imagelinks.text', # bc of image links
'test/testcases/span/01_link/empty_title.text',
'test/testcases/span/04_footnote/markers.text', # bc of footnote in header
'test/testcases/block/06_codeblock/with_lang_in_fenced_block_name_with_dash.text',
'test/testcases/block/06_codeblock/with_lang_in_fenced_block_any_char.text',
'test/testcases/block/03_paragraph/standalone_image.text', # bc of standalone image
'test/testcases/cjk-line-break.text', # latex unicode support
'test/testcases/block/04_header/with_auto_ids.text', # bc of Unicode characters
].compact
Dir[File.dirname(__FILE__) + '/testcases/**/*.text'].each do |text_file|
next if EXCLUDE_LATEX_FILES.any? {|f| text_file =~ /#{f}$/ }
define_method('test_' + text_file.tr('.', '_') + "_to_latex_compilation") do
latex = Kramdown::Document.new(File.read(text_file), auto_ids: false, footnote_nr: 1,
template: 'document').to_latex
Dir.mktmpdir do |tmpdir|
result = IO.popen("latex -output-directory='#{tmpdir}' 2>/dev/null", 'r+') do |io|
io.write(latex)
io.close_write
io.read
end
assert($?.exitstatus == 0, result.scan(/^!(.*\n.*)/).join("\n"))
end
end
end
end
# Generate test methods for text->kramdown->html conversion
`tidy -v 2>&1`
if $?.exitstatus != 0
warn("Skipping text->kramdown->html tests because tidy executable is missing")
else
EXCLUDE_TEXT_FILES = [
'test/testcases/span/05_html/markdown_attr.text', # bc of markdown attr
'test/testcases/block/09_html/markdown_attr.text', # bc of markdown attr
'test/testcases/span/extension/options.text', # bc of parse_span_html option
'test/testcases/block/12_extension/options.text', # bc of options option
'test/testcases/block/12_extension/options3.text', # bc of options option
'test/testcases/block/09_html/content_model/tables.text', # bc of parse_block_html option
'test/testcases/block/09_html/html_to_native/header.text', # bc of auto_ids option that interferes
'test/testcases/block/09_html/html_to_native/table_simple.text', # bc of tr style attr getting removed
'test/testcases/block/09_html/simple.text', # bc of webgen:block elements
'test/testcases/block/11_ial/simple.text', # bc of change of ordering of attributes in header
'test/testcases/span/extension/comment.text', # bc of comment text modifications (can this be avoided?)
'test/testcases/block/04_header/header_type_offset.text', # bc of header_offset being applied twice
'test/testcases/block/06_codeblock/rouge/simple.text',
'test/testcases/block/06_codeblock/rouge/multiple.text', # check, what document contain more, than one code block
'test/testcases/block/14_table/empty_tag_in_cell.text', # bc of tidy
'test/testcases/span/01_link/link_defs_with_ial.text', # bc of attribute ordering
'test/testcases/span/05_html/mark_element.text', # bc of tidy
'test/testcases/block/09_html/xml.text', # bc of tidy
'test/testcases/span/05_html/xml.text', # bc of tidy
'test/testcases/block/03_paragraph/standalone_image.text', # bc of standalone image
'test/testcases/cjk-line-break.text',
'test/testcases/block/09_html/standalone_image_in_div.html', # bc of standalone image
'test/testcases/span/abbreviations/abbrev_in_html.text', # bc of invalid abbr tag in SVG
].compact
Dir[File.dirname(__FILE__) + '/testcases/**/*.text'].each do |text_file|
next if EXCLUDE_TEXT_FILES.any? {|f| text_file =~ /#{f}$/ }
html_file = text_file.sub(/\.text$/, '.html')
next unless File.exist?(html_file)
define_method('test_' + text_file.tr('.', '_') + "_to_kramdown_to_html") do
opts_file = text_file.sub(/\.text$/, '.options')
opts_file = File.join(File.dirname(text_file), 'options') unless File.exist?(opts_file)
options = File.exist?(opts_file) ? YAML.load(File.read(opts_file)) : {auto_ids: false, footnote_nr: 1}
kdtext = Kramdown::Document.new(File.read(text_file), options).to_kramdown
html = Kramdown::Document.new(kdtext, options).to_html
assert_equal(tidy_output(File.read(html_file)), tidy_output(html))
kdtext4 = Kramdown::Document.new(File.read(text_file), options.merge({list_indent: 4})).to_kramdown
html = Kramdown::Document.new(kdtext4, options).to_html
assert_equal(tidy_output(File.read(html_file)), tidy_output(html))
end
end
end
# Generate test methods for html-to-kramdown-to-html conversion
`tidy -v 2>&1`
if $?.exitstatus != 0
warn("Skipping html-to-kramdown-to-html tests because tidy executable is missing")
else
EXCLUDE_HTML_KD_FILES = [
'test/testcases/span/extension/options.html', # bc of parse_span_html option
'test/testcases/span/05_html/normal.html', # bc of br tag before closing p tag
'test/testcases/block/12_extension/nomarkdown.html', # bc of nomarkdown extension
'test/testcases/block/12_extension/options3.html', # bc of rouge
'test/testcases/block/09_html/simple.html', # bc of webgen:block elements
'test/testcases/block/09_html/markdown_attr.html', # bc of markdown attr
'test/testcases/block/09_html/html_to_native/table_simple.html', # bc of invalidly converted simple table
'test/testcases/block/06_codeblock/whitespace.html', # bc of entity to char conversion
'test/testcases/block/06_codeblock/rouge/simple.html', # bc of double surrounding <div>
'test/testcases/block/06_codeblock/rouge/multiple.html', # bc of double surrounding <div>
'test/testcases/block/06_codeblock/guess_lang_css_class.html', # bc of double surrounding <div>
'test/testcases/block/06_codeblock/highlighting.html', # bc of span elements inside code element
'test/testcases/block/06_codeblock/highlighting-opts.html', # bc of span elements inside code element
'test/testcases/block/11_ial/simple.html', # bc of change of ordering of attributes in header
'test/testcases/span/03_codespan/highlighting.html', # bc of span elements inside code element
'test/testcases/block/04_header/with_auto_ids.html', # bc of auto_ids=true option
'test/testcases/block/04_header/header_type_offset.html', # bc of header_offset option
'test/testcases/block/16_toc/toc_exclude.html', # bc of different attribute ordering
'test/testcases/span/autolinks/url_links.html', # bc of quot entity being converted to char
'test/testcases/block/14_table/empty_tag_in_cell.html', # bc of tidy
'test/testcases/span/01_link/link_defs_with_ial.html', # bc of attribute ordering
'test/testcases/span/05_html/mark_element.html', # bc of tidy
'test/testcases/block/09_html/xml.html', # bc of tidy
'test/testcases/span/05_html/xml.html', # bc of tidy
'test/testcases/block/03_paragraph/standalone_image.html', # bc of standalone image
'test/testcases/block/15_math/normal.html', # bc of mathjax and HTML parser
'test/testcases/block/15_math/gh_128.html', # bc of mathjax and HTML parser
'test/testcases/span/04_footnote/backlink_inline.html', # bc of mathjax
'test/testcases/block/09_html/standalone_image_in_div.html', # bc of standalone image
'test/testcases/block/09_html/processing_instruction.html', # bc of PI
'test/testcases/block/04_header/with_header_links.html', # bc of header_links option
].compact
Dir[File.dirname(__FILE__) + '/testcases/**/*.html'].each do |html_file|
next if EXCLUDE_HTML_KD_FILES.any? {|f| html_file =~ /#{f}$/ }
define_method('test_' + html_file.tr('.', '_') + "_to_kramdown_to_html") do
kd = Kramdown::Document.new(File.read(html_file), input: 'html',
auto_ids: false, footnote_nr: 1).to_kramdown
opts_file = html_file.sub(/\.html$/, '.options')
opts_file = File.join(File.dirname(html_file), 'options') unless 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(kd, options)
assert_equal(tidy_output(File.read(html_file)), tidy_output(doc.to_html))
end
end
end
# Generate test methods for text-manpage conversion
Dir[File.dirname(__FILE__) + '/testcases/man/**/*.text'].each do |text_file|
define_method('test_' + text_file.tr('.', '_') + "_to_man_extra") do
man_file = text_file.sub(/\.text$/, '.man')
doc = Kramdown::Document.new(File.read(text_file))
assert_equal(File.read(man_file), doc.to_man)
end
end
EXCLUDE_MODIFY = [
'test/testcases/block/06_codeblock/rouge/multiple.text', # bc of HTMLFormater in options
'test/testcases/block/04_header/with_header_links.text', # bc of header_links option
].compact
# Generate test methods for asserting that converters don't modify the document tree.
Dir[File.dirname(__FILE__) + '/testcases/**/*.text'].each do |text_file|
opts_file = text_file.sub(/\.text$/, '.options')
options = File.exist?(opts_file) ? YAML.load(File.read(opts_file)) : {auto_ids: false, footnote_nr: 1}
(Kramdown::Converter.constants.map(&:to_sym) -
[:Base, :RemoveHtmlTags, :MathEngine, :SyntaxHighlighter]).each do |conv_class|
next if EXCLUDE_MODIFY.any? {|f| text_file =~ /#{f}$/ }
define_method("test_whether_#{conv_class}_modifies_tree_with_file_#{text_file.tr('.', '_')}") do
doc = Kramdown::Document.new(File.read(text_file), options)
options_before = Marshal.load(Marshal.dump(doc.options))
abbrev_proc = doc.root.options[:abbrev_defs].default_proc
doc.root.options[:abbrev_defs].default_proc = doc.root.options[:abbrev_attr].default_proc = nil
tree_before = Marshal.load(Marshal.dump(doc.root))
doc.root.options[:abbrev_defs].default_proc = doc.root.options[:abbrev_attr].default_proc =
abbrev_proc
Kramdown::Converter.const_get(conv_class).convert(doc.root, doc.options)
assert_equal(options_before, doc.options)
assert_tree_not_changed(tree_before, doc.root)
end
end
end
def assert_tree_not_changed(old, new)
assert_equal(old.type, new.type, "type mismatch")
if old.value.kind_of?(Kramdown::Element)
assert_tree_not_changed(old.value, new.value)
else
assert(old.value == new.value, "value mismatch")
end
assert_equal(old.attr, new.attr, "attr mismatch")
assert_equal(old.options, new.options, "options mismatch")
assert_equal(old.children.length, new.children.length, "children count mismatch")
old.children.each_with_index do |child, index|
assert_tree_not_changed(child, new.children[index])
end
end
end
@@ -0,0 +1,216 @@
# -*- coding: utf-8; frozen_string_literal: true -*-
#
#--
# Copyright (C) 2009-2026 Thomas Leitner <t_leitner@gmx.at>
#
# This file is part of kramdown which is licensed under the MIT.
#++
#
require 'minitest/autorun'
require 'kramdown'
Encoding.default_external = 'utf-8'
describe 'location' do
# checks that +element+'s :location option corresponds to the location stored
# in the element.attr['class']
def check_element_for_location(element)
if (match = /^line-(\d+)/.match(element.attr['class'] || ''))
expected_line = match[1].to_i
assert_equal(expected_line, element.options[:location])
end
element.children.each do |child|
check_element_for_location(child)
end
end
# Test cases consist of a kramdown string that uses IALs to specify the expected
# line numbers for a given element.
test_cases = {
'autolink' => %(testing autolinks\n\n<http://kramdown.org>{:.line-3}),
'blockquote' => %(
> block quote1
>
> * {:.line-3} list item in block quote
> * {:.line-4} list item in block quote
> {:.line-3}
{:.line-1}
> block quote2
{:.line-8}
),
'codeblock' => %(\na para\n\n~~~~\ntest code 1\n~~~~\n{:.line-3}\n\n test code 2\n{:.line-8}\n),
'codespan' => %(a para\n\nanother para `<code>`{:.line-3} with code\n),
'emphasis' => %(
para *span*{:.line-1}
{:.line-1}
## header *span*{:.line-4}
{:.line-4}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum *short span on single line*{:.line-11}
dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
*long span over multiple lines - proident, sunt in culpa qui officia deserunt
mollit anim id est laborum.*{:.line-13}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
`code span`{:.line-18}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
{:.line-7}
),
'header' => %(
# header1
{:.line-1}
## header2
{:.line-4}
## header3
{:.line-7}
header4
=======
{:.line-10}
^
header5
-------
{:.line-16}
),
'horizontal_rule' => %(\na para\n\n----\n{:.line-3}\n),
'html_entity' => "a para\n\nanother para with &amp;{:.line-3} html entity.\n",
'link' => %(
a para
This is [a link](http://rubyforge.org){:.line-3} to a page.
Here comes a ![smiley](../images/smiley.png){:.line-5}
),
'list' => %(
* {:.line-1} list item
* {:.line-2} list item
* {:.line-3} list item
{:.line-1}
{:.line-7}
1. {:.line-7} list item
2. {:.line-8} list item
3. {:.line-9} list item
{:.line-12}
definition term 1
: {:.line-13} definition definition 1
definition term 2
: {:.line-15} definition definition 2
),
'math_block' => %(\na para\n\n$$5+5$$\n{:.line-3}\n),
'math_inline' => %(\na para\n\nanother para with inline math $$5+5$${:.line-3}\n),
'paragraph' => %(
para1
{:.line-1}
para2
{:.line-4}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
{:.line-7}
{:.line-14}
para with leading IAL
),
'table' => %(
a para
|first|second|third|
|-----|------|-----|
|a |b |c |
{:.line-3}
),
'typographic_symbol' => %(
a para
another para ---{:.line-3}
another para ...{:.line-5}
),
'gh issue 129' => %(
`|`
{:.line-1}
),
'gh issue 131' => %(
* {:.line-1} test
line 2
* {:.line-3} second
* {:.line-4} third
* {:.line-5} * {:.line-5} one
* {:.line-6} two
),
'gh issue 158' => %(
😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁
{:.line-1}
- {:.line-4} T
{:.line-4}
# T
{:.line-7}
),
'gh issue 243 - HTML raw elements' => %(
<ul class="line-1">
<li class="line-2">Test</li>
</ul>
),
}
test_cases.each do |name, test_string|
it "Handles #{name}" do
doc = Kramdown::Document.new(test_string.gsub(/^ /, '').strip)
check_element_for_location(doc.root)
end
end
it 'adds location info to duplicate abbreviation definition warnings' do
test_string = %(This snippet contains a duplicate abbreviation definition
*[duplicate]: The first definition
*[duplicate]: The second definition
)
doc = Kramdown::Document.new(test_string.strip)
assert_equal(["Duplicate abbreviation ID 'duplicate' on line 4 - overwriting"], doc.warnings)
end
it 'handles abbreviations' do
str = "This *is* ABC and\n**and** ABC second\nanother ABC\nas ABC as\nABC at the end.\n\n*[ABC]: ABC"
doc = Kramdown::Document.new(str)
doc.root.children.first.children.select {|e| e.type == :abbreviation }.each_with_index do |e, i|
assert_equal(i + 1, e.options[:location])
end
end
it 'handles line breaks' do
str = "First \nsecond\\\\\nthird \n"
doc = Kramdown::Document.new(str)
doc.root.children.first.children.select {|e| e.type == :br }.each_with_index do |e, i|
assert_equal(i + 1, e.options[:location])
end
end
it 'handles smart quotes' do
str = "This is 'first'\nand 'second' and\n'third'"
doc = Kramdown::Document.new(str)
doc.root.children.first.children.select {|e| e.type == :smart_quote }.each_with_index do |e, i|
assert_equal(((i + 1) / 2.0).ceil, e.options[:location])
end
end
end
@@ -0,0 +1,27 @@
# -*- coding: utf-8; frozen_string_literal: true -*-
#
#--
# Copyright (C) 2009-2026 Thomas Leitner <t_leitner@gmx.at>
#
# This file is part of kramdown which is licensed under the MIT.
#++
#
require 'minitest/autorun'
require 'kramdown/utils/string_scanner'
describe Kramdown::Utils::StringScanner do
[
["...........X............", [/X/], 1],
["1\n2\n3\n4\n5\n6X", [/X/], 6],
["1\n2\n3\n4\n5\n6X\n7\n8X", [/X/, /X/], 8],
[(".\n" * 1000) + 'X', [/X/], 1001],
].each_with_index do |test_data, i|
test_string, scan_regexes, expect = test_data
it "computes the correct current_line_number for example ##{i + 1}" do
str_sc = Kramdown::Utils::StringScanner.new(test_string)
scan_regexes.each {|scan_re| str_sc.scan_until(scan_re) }
assert_equal(expect, str_sc.current_line_number)
end
end
end
@@ -0,0 +1,3 @@
^
@@ -0,0 +1 @@
@@ -0,0 +1,3 @@
^
@@ -0,0 +1,5 @@
^
@@ -0,0 +1,18 @@
<p>This is a para.</p>
<p>This is a para.</p>
<p>This is a para.</p>
<p>This is a para.</p>
<pre><code>This is a code block.
</code></pre>
<p>And this is another.</p>
<p>A para
with
mixed
indents.
and with much indent</p>
@@ -0,0 +1,18 @@
<p>This is a para.</p>
<p>This is a para.</p>
<p>This is a para.</p>
<p>This is a para.</p>
<pre><code>This is a code block.
</code></pre>
<p>And this is another.</p>
<p>A para
<br /> with
<br /> mixed
<br />indents.
<br /> and with much indent</p>
@@ -0,0 +1,19 @@
This is a para.
This is a para.
This is a para.
This is a para.
This is a code block.
And this is another.
A para
with
mixed
indents.
and with much indent
@@ -0,0 +1,9 @@
<p>First line<br />
<a href="https://example.com">https://example.com</a></p>
<p>First line<br />
<a href="https://example.com">https://example.com</a></p>
<p>Last Line</p>
<p>Last Line\</p>
@@ -0,0 +1,9 @@
First line
<https://example.com>
First line\\
<https://example.com>
Last Line
Last Line\\
@@ -0,0 +1,5 @@
<p>One paragraph
over
multiple lines.</p>
<p>Second one without newline.</p>
@@ -0,0 +1,5 @@
One paragraph
over
multiple lines.
Second one without newline.
@@ -0,0 +1 @@
<p>This is just a normal paragraph.</p>
@@ -0,0 +1 @@
This is just a normal paragraph.
@@ -0,0 +1,13 @@
<p>para</p>
<figure class="class" id="id">
<img src="some.jpg" alt="standalone image" key="value" />
<figcaption>standalone image</figcaption>
</figure>
<figure id="block-id" class="block-class" block-key="block-value">
<img src="some.jpg" alt="standalone image" id="id" class="class" key="value" />
<figcaption>standalone image</figcaption>
</figure>
<p>para</p>
@@ -0,0 +1,9 @@
para
{:standalone}
![standalone image](some.jpg){:#id .class key="value" standalone}
![standalone image](some.jpg){:#id .class key="value" standalone}
{:#block-id .block-class block-key="block-value"}
para
@@ -0,0 +1,7 @@
aa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa
\: No definiion list
a:
*a*:
@@ -0,0 +1,5 @@
aa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa : No definiion list
a:
*a*:
@@ -0,0 +1,4 @@
<p>This is just a normal paragraph.
That goes on to the second line.</p>
<p>Another paragraph.</p>
@@ -0,0 +1,4 @@
This is just a normal paragraph.
That goes on to the second line.
Another paragraph.
@@ -0,0 +1 @@
<p><img src="http://example.com/image.png" alt="" /> some text</p>
@@ -0,0 +1 @@
:html_to_native: true
@@ -0,0 +1 @@
<p><img src="http://example.com/image.png" alt="" /></p> some text
@@ -0,0 +1,57 @@
<h1>This is a header</h1>
<h2>This is a header</h2>
<h3>This is a header</h3>
<h4>This is a header</h4>
<h5>This is a header</h5>
<h6>This is a header</h6>
<h1>Header</h1>
<h1>Header</h1>
<h2>Header</h2>
<blockquote>
<p>blockquote</p>
</blockquote>
<h6>header</h6>
<p>paragraph</p>
<blockquote>
<p>blockquote
### not a header</p>
</blockquote>
<h1>header</h1>
<h1>header</h1>
<h1>header</h1>
<h1>header #</h1>
<h1>header</h1>
<p>#</p>
<p>#</p>
<h3 id="id">Header</h3>
<h3 id="Id">Header</h3>
<h3 id="id">Header</h3>
<h3 id="A-Za-z0-9_:t">Header</h3>
<h3>Header {#9ab}</h3>
<h3>Header{#noid}</h3>
<h3>Header ##{#noid}</h3>
<h3>Last</h3>
@@ -0,0 +1,54 @@
# This is a header
## This is a header
### This is a header
#### This is a header
##### This is a header
###### This is a header
# Header
^
# Header
##Header #####
> blockquote
###### header
paragraph
> blockquote
### not a header
# header #
# header#
#header#
# header \#
# header
#
#
### Header {#id}
### Header ## {#Id}
### Header ## {#id}
### Header {#A-Za-z0-9_:t}
### Header {#9ab}
### Header{#noid}
### Header ##{#noid}
### Last
@@ -0,0 +1,11 @@
<h2>Lorem ipsum</h2>
<h3>Lorem ipsum</h3>
<h4>Lorem ipsum</h4>
<h6>Lorem ipsum</h6>
<h2>Lorem ipsum</h2>
<h3>Lorem ipsum</h3>
@@ -0,0 +1,12 @@
## Lorem ipsum
### Lorem ipsum
#### Lorem ipsum
###### Lorem ipsum
## Lorem ipsum
### Lorem ipsum
@@ -0,0 +1,12 @@
\subsection*{Lorem ipsum}
\subsubsection*{Lorem ipsum}
\paragraph*{Lorem ipsum}
\subparagraph*{Lorem ipsum}
\subsection*{Lorem ipsum}
\subsubsection*{Lorem ipsum}
@@ -0,0 +1,2 @@
:header_offset: 1
:auto_ids: false
@@ -0,0 +1,13 @@
# Lorem ipsum
## Lorem ipsum
### Lorem ipsum
###### Lorem ipsum
Lorem ipsum
===========
Lorem ipsum
-----------
@@ -0,0 +1,32 @@
<h2>test</h2>
<h1>test2</h1>
<h2>test</h2>
<p>para</p>
<pre><code> header =
</code></pre>
<p>=</p>
<p>This is a para.
With two lines.
And not a header.
=================</p>
<blockquote>
<p>Blockquote.
Not a Header
-</p>
</blockquote>
<h2 id="id">header</h2>
<h1 id="Id">header</h1>
<h2 id="A-Za-z0-9_:">header</h2>
<h2>header{#noid}</h2>
<h2>header</h2>
@@ -0,0 +1,39 @@
test
-
test2
=========
test
-
para
header
=
=
This is a para.
With two lines.
And not a header.
=================
> Blockquote.
Not a Header
-
header {#id}
------------
header {#Id}
======
header {#A-Za-z0-9_:}
------
header{#noid}
-----
header
------
@@ -0,0 +1,3 @@
<h1 id="hallo_header-1">Header 1</h1>
<h1 id="hallo_section">123</h1>
@@ -0,0 +1,2 @@
:auto_ids: true
:auto_id_prefix: hallo_
@@ -0,0 +1,3 @@
# Header 1
# 123
@@ -0,0 +1 @@
<h1 id="this-is-a-header"><em class="none">This is a header</em></h1>
@@ -0,0 +1 @@
:auto_id_stripping: true
@@ -0,0 +1 @@
# <em class="none">This is a header</em>
@@ -0,0 +1,21 @@
<h1 id="this-is-a-header">This is a header</h1>
<h2 id="another-one-1-here">12. Another one-1-here</h2>
<h3 id="do--it-now">Do ^&amp; it now</h3>
<h1 id="hallo">Hallo</h1>
<h2 id="not-now">Not now</h2>
<h1 id="hallo-1">Hallo</h1>
<h1 id="section">23232</h1>
<h1 id="section-1">33333</h1>
<h2 id="hallo-2">hallO</h2>
<h1>Header without ID</h1>
<h1 id="transliterated-day-la-vi-du">Transliterated: Đây-là-ví-dụ</h1>
@@ -0,0 +1,2 @@
:auto_ids: true
:transliterated_header_ids: true
@@ -0,0 +1,24 @@
# This is a header
## 12. Another one-1-here
### Do ^& it now
Hallo
=====
Not now
-------
# Hallo
# 23232
# 33333
## hallO
# Header without ID
{: id=""}
# Transliterated: Đây-là-ví-dụ
@@ -0,0 +1,7 @@
<h1 id="header"><a href="#header"></a>This is a header</h1>
<h2>12. Another one-1-here</h2>
<h3>Do ^&amp; it now</h3>
<h1>Header without ID</h1>
@@ -0,0 +1,2 @@
:header_links: true
:auto_ids: false
@@ -0,0 +1,8 @@
# This is a header {#header}
## 12. Another one-1-here
### Do ^& it now
# Header without ID
{: id=""}
@@ -0,0 +1 @@
<h1>foo<br />bar</h1>
@@ -0,0 +1 @@
# foo<br />bar
@@ -0,0 +1,25 @@
<blockquote>
<p>A normal blockquote.</p>
</blockquote>
<blockquote>
<p>A normal blockquote.</p>
</blockquote>
<blockquote>
<p>A normal blockquote.</p>
</blockquote>
<blockquote>
<p>A normal blockquote.</p>
</blockquote>
<pre><code>&gt; A codeblock
</code></pre>
<blockquote>
<p>Blockquote
with
mixed
indents.</p>
</blockquote>
@@ -0,0 +1,14 @@
> A normal blockquote.
> A normal blockquote.
> A normal blockquote.
> A normal blockquote.
> A codeblock
> Blockquote
> with
>mixed
> indents.
@@ -0,0 +1,34 @@
<blockquote>
<p>This is a long
long line.</p>
</blockquote>
<blockquote>
<blockquote>
<p>Nested quote
inside
still inside</p>
</blockquote>
</blockquote>
<blockquote>
<blockquote>
<p>This is a subquote.
over multipline lines.
continuing
here</p>
</blockquote>
</blockquote>
<blockquote>
<p>This is a quote
no code</p>
</blockquote>
<blockquote id="id">
<p>This is a quote</p>
</blockquote>
<blockquote>
<p>This is a quote</p>
</blockquote>
@@ -0,0 +1,20 @@
> This is a long
long line.
> > Nested quote
inside
> still inside
> > This is a subquote.
> > over multipline lines.
> continuing
here
> This is a quote
no code
> This is a quote
{: #id}
> This is a quote
^
@@ -0,0 +1,10 @@
<blockquote>
<p>foo</p>
<blockquote>
<p>bar
baz</p>
</blockquote>
<p>foo</p>
</blockquote>
@@ -0,0 +1,6 @@
> foo
>
> > bar
>> baz
>
> foo
@@ -0,0 +1,4 @@
<blockquote>
<p>This is a block quote
with no newline.</p>
</blockquote>
@@ -0,0 +1,2 @@
> This is a block quote
> with no newline.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,15 @@
<blockquote>
<p>Example:</p>
<pre><code>sub status {
print "working";
}
</code></pre>
<p>Or:</p>
<pre><code>sub status {
return "working";
}
</code></pre>
</blockquote>
@@ -0,0 +1,11 @@
>Example:
>
> sub status {
> print "working";
> }
>
> Or:
>
> sub status {
> return "working";
> }
@@ -0,0 +1,4 @@
<pre><code>x = Class.new
</code></pre>
<pre lang="html"><code>&lt;a&gt;href&lt;/a&gt;
</code></pre>
@@ -0,0 +1 @@
:enable_coderay: false
@@ -0,0 +1,4 @@
x = Class.new
^
<a>href</a>
{: lang="html"}
@@ -0,0 +1,4 @@
<p>Some para</p>
<p>~~~~~~
not codeblock</p>
@@ -0,0 +1,4 @@
Some para
~~~~~~
not codeblock
@@ -0,0 +1,15 @@
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>class Foo
def bar
puts 'Hello'
end
end
</code></pre>
</div></div>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>class Foo
def bar
puts 'Hello'
end
end
</code></pre>
</div></div>
@@ -0,0 +1,2 @@
:syntax_highlighter_opts:
guess_lang: true
@@ -0,0 +1,13 @@
~~~
class Foo
def bar
puts 'Hello'
end
end
~~~
class Foo
def bar
puts 'Hello'
end
end
@@ -0,0 +1,9 @@
\begin{minted}[breaklines,linenos]{ruby}
x = Class.new
\end{minted}
\begin{minted}[breaklines,linenos]{html}
<a>this is a reaally, reaally, reaally, reaally, reaally, reaally, reaally, reaally, reaally, reaally, reaally, long link</a>
\end{minted}
@@ -0,0 +1,4 @@
:syntax_highlighter: minted
:syntax_highlighter_opts:
wrap: true
line_numbers: true
@@ -0,0 +1,5 @@
x = Class.new
{: .language-ruby}
<a>this is a reaally, reaally, reaally, reaally, reaally, reaally, reaally, reaally, reaally, reaally, reaally, long link</a>
{: .language-html}
@@ -0,0 +1,8 @@
\begin{minted}[]{ruby}
x = Class.new
\end{minted}
\begin{minted}[]{html}
<a>href</a>
\end{minted}
@@ -0,0 +1,3 @@
:syntax_highlighter: minted
:syntax_highlighter_opts:
default_lang: ruby
@@ -0,0 +1,4 @@
x = Class.new
^
<a>href</a>
{: .language-html}
@@ -0,0 +1,6 @@
<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">x</span> <span class="o">=</span> <span class="no">Class</span><span class="p">.</span><span class="nf">new</span>
</code></pre>
</div></div>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;a&gt;</span>href<span class="nt">&lt;/a&gt;</span>
</code></pre>
</div></div>
@@ -0,0 +1,7 @@
:syntax_highlighter_opts:
block:
css: class
default_lang: ruby
wrap: span
line_numbers: null
@@ -0,0 +1,4 @@
x = Class.new
^
<a>href</a>
{: .language-html}
@@ -0,0 +1,5 @@
<pre><code>x = Class.new
</code></pre>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;a&gt;</span>href<span class="nt">&lt;/a&gt;</span>
</code></pre>
</div></div>
@@ -0,0 +1,5 @@
:coderay_default_lang: ruby
:coderay_wrap: span
:coderay_line_numbers: ~
:coderay_css: class
@@ -0,0 +1,4 @@
x = Class.new
^
<a>href</a>
{: .language-html}
@@ -0,0 +1,164 @@
<p>B</p>
<pre><code> BBBBBBBB.
BBBB BB BBBBBBBB BBBBB. BBBBBBB BB BBBBB BB BBB BBBB BBBBB BBB BBB BBBB BBB BBBBBBB BBB BBBBBBB. B BBB'B BBBBB BBBB BBB BBBB BBBBBBB BBBB BBBB BBBB BBBBBBBB.
BBB BBBBB BBBBB BBB BBBB BBBB BBBB, BBB BBBBB BB BBBBB BBB BB BBBBBB BBBB BBB BBBBB BBBB BB. BBBBB BBB BBBBB BBBBB BBB BBBB BB BBBB BBBB BBBBB.
BBBB BBBBB, BBBBB, BBBBBBBB?
BB BBB BB BBBB BBB BBBB BBB BBBBBB /BBB BB BBBBBBBBB BBBB BBBBBBB BBBBBB BB BBB.
BBBB BBBBBBBB BBB BBBB BB BBBBB BBB BBBBBB BBBB BBBBB BBBBBB BBBBBBBBB BBBB BB BBBBB......................................................................
BBBBB B'B BBB BBBBB. BBBB BBBBB BBBBB. ( B BBBBB BBBBBBBBBB BBBBB BBBB'B BBBBB BBBBB. BBB BBBB BBBBB BBBB BBBB. BBBBBBB BBB BB BBBBBBB BBB BBB B BBBB BBBBBBBBBBBB. BBBBB BBBBB.)
BBBB'B BB
</code></pre>
<p>.</p>
<pre><code> B BBB BBB BBB ? B. B BBB BBBBBB BBBB BBB BBBB. BBBBBBB BB BBBBBBB B BBBB BBBB BBB BBBBBB.
BBBB BB 'BBBB' BBBB BBBBB.
BBBBBBBB B BBBB BBBBBB BB BBBBBBBB BBB BBBBBBB BBBBBBB BBBBBBB.
B BBBB BB BBBB. BBBBB BBBBBBBB. BBB BB BB. BB BB BBBB BB BBBBBBBBBB. BB BBBBBBBB BB BBBBBBBBB.
BBBBBBBB BB BBBB. BBBBBBB BBB BBBBB BBBBB BBBBB. B'BB BBBBBBB BB BBBBB BBBBB BBBBBBB BBB BBBBB. BBBB.
B BBBBBB BBBB BB BBBB BBB. (BB BBB BBBBB BBBBB...............B)
BBBB!
BBBB BB BBB BBBBBBB BBBBBB. B
</code></pre>
<p>B</p>
<pre><code> BBBBB BB/BBB BBBBB! BBBB BBBB BBBBBBBBBBB 'BBB'B BBBBBB.'
BBBB BBBBBBB BBBB BB BBB BBBBBBBB BB BBBB BBBBBB BBB BBBBBBBBB BBBB. BBBBBBBB BBBBBBB BBBB BBBB BBBB BB BBBB BB BBBB BB BBBB B BBB BB BBBBB BBBBBB. B BBBB BBBBBBB BB BBBB BBBBB B BBB BBBBBBB BB BBBBB BBBB. BBB BBBBBBB BBBB. B BBB BBBB BBBB B BBBB BBBBBB BBB B BBBBBB BBBBBB. BBB BB BBBBBB BBBBBB BBBBBBBBBB BB...BBBBB BBBB BBBB BB BBBBB. (BBBBBBB BBB BBBBBB BBB'B BBBB BBB BBBBB BBB BB BBBBB BBBBBBBBBBB BBBBB B BBBB BBBB BBBBB.
BBBBB BB BB BBBB B'B BBBB BBBBB BBBBB BBB BB BBBBBB/BBB (BBBBB) BBBBBB BB.
BBBBBBBB. B BBB BBBB BB BB BBB/BBBBBB BBBBBB BBB BBBB BBBBBBBB BB BB B BBBBBB BBBBBB BBBBB. (BBB/B BBB BBBB BBBB...BBB BBB BBB BBBB BB BB B BBBB BB BBB BB? BBBBBBB B BBB B BBBB BBBBBBBB BBB B BBB BBB BBBBB BBBB BBB BBBB BB B BBBBBBBB BB BBBBB BB BB BBB BBBBB BBB BB BBBBB BBBBBBB B BBB BBBBBBB. BBBBBB (BBBBB) BBBB BBBBB BBBBBBB BBBBB BBBB BBBB BBB. 100 BBBBBB BB BBBBB. BBBB BBB BBB BBBBBB BBB BB. BBB BBBB BB BBB BBBBB! BBB BB BBBBBB BBBBB B BBB'B BBBBBBBBB BBBB BBB BBB. (BBBBBB BBBBBBB BB BBBB BBBBB (BBBBBB BBBBB BBBBB BBBBB.))
BBB B BBBBBBBBBBB BBBB BBB BB BBB. BBBBB BBB BBBBB B BBBB BBBBBB BBBBB BBB. BB BBBBBB BBB BBBB B BBB BB BBBBBBBB BBBBBB BBBB BBB B BBBBBB BBBB BBBBBB BBBBBBB BBBB BBBB BBB BBBBBBBB.
BBBBB!!!!!!!
B BBB BBBB BBBBBB BBBB BBBB BBBB B BBB BBBBB BBB BBBBB B BBBB BBBBBBB BB BB BBBB BBBBBBBBB. B BBBB BBBBBB BBBBBBB BBBB BBBB BBB BBBB.
BB BB, BB BBBBBB BBBB, (BBBBBB BB BBB BBBB . BBBBB BB BBBB BBBB BB BB BBBB BBBB B BBBB BB BB (BB BBBB BB BBB BBBBBBB BB BBBBBBB. )) BB'BB BBB BBB'B BB BB BBBB BB B BBBB B BBBBB (BB BBBBBB BB BBB B'BB BBBBBBBB BB BBBB BBBB.)
B BBBBB B'BB BBB BB BBBB BBB BBB.
</code></pre>
@@ -0,0 +1,188 @@
B
BBBBBBBB.
BBBB BB BBBBBBBB BBBBB. BBBBBBB BB BBBBB BB BBB BBBB BBBBB BBB BBB BBBB BBB BBBBBBB BBB BBBBBBB. B BBB'B BBBBB BBBB BBB BBBB BBBBBBB BBBB BBBB BBBB BBBBBBBB.
BBB BBBBB BBBBB BBB BBBB BBBB BBBB, BBB BBBBB BB BBBBB BBB BB BBBBBB BBBB BBB BBBBB BBBB BB. BBBBB BBB BBBBB BBBBB BBB BBBB BB BBBB BBBB BBBBB.
BBBB BBBBB, BBBBB, BBBBBBBB?
BB BBB BB BBBB BBB BBBB BBB BBBBBB /BBB BB BBBBBBBBB BBBB BBBBBBB BBBBBB BB BBB.
BBBB BBBBBBBB BBB BBBB BB BBBBB BBB BBBBBB BBBB BBBBB BBBBBB BBBBBBBBB BBBB BB BBBBB......................................................................
BBBBB B'B BBB BBBBB. BBBB BBBBB BBBBB. ( B BBBBB BBBBBBBBBB BBBBB BBBB'B BBBBB BBBBB. BBB BBBB BBBBB BBBB BBBB. BBBBBBB BBB BB BBBBBBB BBB BBB B BBBB BBBBBBBBBBBB. BBBBB BBBBB.)
BBBB'B BB
.
B BBB BBB BBB ? B. B BBB BBBBBB BBBB BBB BBBB. BBBBBBB BB BBBBBBB B BBBB BBBB BBB BBBBBB.
BBBB BB 'BBBB' BBBB BBBBB.
BBBBBBBB B BBBB BBBBBB BB BBBBBBBB BBB BBBBBBB BBBBBBB BBBBBBB.
B BBBB BB BBBB. BBBBB BBBBBBBB. BBB BB BB. BB BB BBBB BB BBBBBBBBBB. BB BBBBBBBB BB BBBBBBBBB.
BBBBBBBB BB BBBB. BBBBBBB BBB BBBBB BBBBB BBBBB. B'BB BBBBBBB BB BBBBB BBBBB BBBBBBB BBB BBBBB. BBBB.
B BBBBBB BBBB BB BBBB BBB. (BB BBB BBBBB BBBBB...............B)
BBBB!
BBBB BB BBB BBBBBBB BBBBBB.
B
B
BBBBB BB/BBB BBBBB! BBBB BBBB BBBBBBBBBBB 'BBB'B BBBBBB.'
BBBB BBBBBBB BBBB BB BBB BBBBBBBB BB BBBB BBBBBB BBB BBBBBBBBB BBBB. BBBBBBBB BBBBBBB BBBB BBBB BBBB BB BBBB BB BBBB BB BBBB B BBB BB BBBBB BBBBBB. B BBBB BBBBBBB BB BBBB BBBBB B BBB BBBBBBB BB BBBBB BBBB. BBB BBBBBBB BBBB. B BBB BBBB BBBB B BBBB BBBBBB BBB B BBBBBB BBBBBB. BBB BB BBBBBB BBBBBB BBBBBBBBBB BB...BBBBB BBBB BBBB BB BBBBB. (BBBBBBB BBB BBBBBB BBB'B BBBB BBB BBBBB BBB BB BBBBB BBBBBBBBBBB BBBBB B BBBB BBBB BBBBB.
BBBBB BB BB BBBB B'B BBBB BBBBB BBBBB BBB BB BBBBBB/BBB (BBBBB) BBBBBB BB.
BBBBBBBB. B BBB BBBB BB BB BBB/BBBBBB BBBBBB BBB BBBB BBBBBBBB BB BB B BBBBBB BBBBBB BBBBB. (BBB/B BBB BBBB BBBB...BBB BBB BBB BBBB BB BB B BBBB BB BBB BB? BBBBBBB B BBB B BBBB BBBBBBBB BBB B BBB BBB BBBBB BBBB BBB BBBB BB B BBBBBBBB BB BBBBB BB BB BBB BBBBB BBB BB BBBBB BBBBBBB B BBB BBBBBBB. BBBBBB (BBBBB) BBBB BBBBB BBBBBBB BBBBB BBBB BBBB BBB. 100 BBBBBB BB BBBBB. BBBB BBB BBB BBBBBB BBB BB. BBB BBBB BB BBB BBBBB! BBB BB BBBBBB BBBBB B BBB'B BBBBBBBBB BBBB BBB BBB. (BBBBBB BBBBBBB BB BBBB BBBBB (BBBBBB BBBBB BBBBB BBBBB.))
BBB B BBBBBBBBBBB BBBB BBB BB BBB. BBBBB BBB BBBBB B BBBB BBBBBB BBBBB BBB. BB BBBBBB BBB BBBB B BBB BB BBBBBBBB BBBBBB BBBB BBB B BBBBBB BBBB BBBBBB BBBBBBB BBBB BBBB BBB BBBBBBBB.
BBBBB!!!!!!!
B BBB BBBB BBBBBB BBBB BBBB BBBB B BBB BBBBB BBB BBBBB B BBBB BBBBBBB BB BB BBBB BBBBBBBBB. B BBBB BBBBBB BBBBBBB BBBB BBBB BBB BBBB.
BB BB, BB BBBBBB BBBB, (BBBBBB BB BBB BBBB . BBBBB BB BBBB BBBB BB BB BBBB BBBB B BBBB BB BB (BB BBBB BB BBB BBBBBBB BB BBBBBBB. )) BB'BB BBB BBB'B BB BB BBBB BB B BBBB B BBBBB (BB BBBBBB BB BBB B'BB BBBBBBBB BB BBBB BBBB.)
B BBBBB B'BB BBB BB BBBB BBB BBB.
@@ -0,0 +1,4 @@
<pre><code>This is some code
This is some other code
</code></pre>
@@ -0,0 +1,5 @@
This is some
code
This is some
other code
@@ -0,0 +1,2 @@
<pre><code>test
</code></pre>
@@ -0,0 +1,2 @@
<pre><code>test test
</code></pre>
@@ -0,0 +1,13 @@
<pre><code>starting code
</code></pre>
<p>paragraph</p>
<pre><code>other code
with samples
</code></pre>
<p>paragraph</p>
<pre><code> ending code
</code></pre>

Some files were not shown because too many files have changed in this diff Show More