Skip to content
Browse files

Removed slash for string concatenation.

For bugs.ruby-lang.org issue #6265
  • Loading branch information...
1 parent 84d5727 commit 1f53185ba9fe100335fff6a54db6a168f4448bd2 @drbrain drbrain committed
View
6 lib/rdoc/markup/to_html.rb
@@ -210,9 +210,9 @@ def accept_verbatim verbatim
begin
tokens = RDoc::RubyLex.tokenize text, @options
- "\n<pre class=\"ruby\">" \
- "#{RDoc::TokenStream.to_html tokens}" \
- "</pre>\n"
+ html = RDoc::TokenStream.to_html tokens
+
+ "\n<pre class=\"ruby\">#{html}</pre>\n"
rescue RDoc::RubyLex::Error
"\n<pre>#{CGI.escapeHTML text}</pre>\n"
end
View
6 lib/rdoc/parser/c.rb
@@ -693,8 +693,7 @@ def handle_class_module(var_name, type, class_name, parent, in_module)
end
unless enclosure then
- @options.warn "Enclosing class/module '#{in_module}' for " \
- "#{type} #{class_name} not known"
+ @options.warn "Enclosing class/module '#{in_module}' for #{type} #{class_name} not known"
return
end
else
@@ -838,8 +837,7 @@ def handle_method(type, var_name, meth_name, function, param_count,
if File.exist? file_name then
file_content = File.read file_name
else
- @options.warn "unknown source #{source_file} for " \
- "#{meth_name} in #{@file_name}"
+ @options.warn "unknown source #{source_file} for #{meth_name} in #{@file_name}"
end
else
file_content = @content
View
8 lib/rdoc/stats.rb
@@ -259,8 +259,7 @@ def report_attributes cm
cm.each_attribute do |attr|
next if attr.documented?
- report << " #{attr.definition} :#{attr.name} " \
- "# in file #{attr.file.full_name}"
+ report << " #{attr.definition} :#{attr.name} # in file #{attr.file.full_name}"
end
report
@@ -277,9 +276,8 @@ def report_class_module cm
if cm.in_files.empty? then
report << "# #{cm.definition} is referenced but empty."
- report << '#'
- report << '# It probably came from another project. ' \
- "I'm sorry I'm holding it against you."
+ report << "#"
+ report << "# It probably came from another project. I'm sorry I'm holding it against you."
report << nil
return report
View
16 test/test_rdoc_any_method.rb
@@ -134,14 +134,14 @@ def test_marshal_load_version_0
al = RDoc::Alias.new nil, 'method', 'aliased', 'alias comment'
al_m = m.add_alias al, cm
- loaded = Marshal.load "\x04\bU:\x14RDoc::AnyMethod[\x0Fi\x00I" \
- "\"\vmethod\x06:\x06EF\"\x11Klass#method0:\vpublic" \
- "o:\eRDoc::Markup::Document\x06:\v@parts[\x06" \
- "o:\x1CRDoc::Markup::Paragraph\x06;\t[\x06I" \
- "\"\x16this is a comment\x06;\x06FI" \
- "\"\rcall_seq\x06;\x06FI\"\x0Fsome_block\x06;\x06F" \
- "[\x06[\aI\"\faliased\x06;\x06Fo;\b\x06;\t[\x06" \
- "o;\n\x06;\t[\x06I\"\x12alias comment\x06;\x06FI" \
+ loaded = Marshal.load "\x04\bU:\x14RDoc::AnyMethod[\x0Fi\x00I" +
+ "\"\vmethod\x06:\x06EF\"\x11Klass#method0:\vpublic" +
+ "o:\eRDoc::Markup::Document\x06:\v@parts[\x06" +
+ "o:\x1CRDoc::Markup::Paragraph\x06;\t[\x06I" +
+ "\"\x16this is a comment\x06;\x06FI" +
+ "\"\rcall_seq\x06;\x06FI\"\x0Fsome_block\x06;\x06F" +
+ "[\x06[\aI\"\faliased\x06;\x06Fo;\b\x06;\t[\x06" +
+ "o;\n\x06;\t[\x06I\"\x12alias comment\x06;\x06FI" +
"\"\nparam\x06;\x06F"
loaded.store = @store
View
18 test/test_rdoc_attr.rb
@@ -112,10 +112,10 @@ def test_marshal_load_version_1
cm = tl.add_class RDoc::NormalClass, 'Klass'
section = cm.sections.first
- data = "\x04\bU:\x0FRDoc::Attr[\fi\x06I\"\tattr\x06:\x06EF" \
- "\"\x0FKlass#attrI\"\aRW\x06;\x06F:\vpublic" \
- "o:\eRDoc::Markup::Document\x06:\v@parts[\x06" \
- "o:\x1CRDoc::Markup::Paragraph\x06;\t[\x06I" \
+ data = "\x04\bU:\x0FRDoc::Attr[\fi\x06I\"\tattr\x06:\x06EF" +
+ "\"\x0FKlass#attrI\"\aRW\x06;\x06F:\vpublic" +
+ "o:\eRDoc::Markup::Document\x06:\v@parts[\x06" +
+ "o:\x1CRDoc::Markup::Paragraph\x06;\t[\x06I" +
"\"\x16this is a comment\x06;\x06FF"
loaded = Marshal.load data
@@ -144,11 +144,11 @@ def test_marshal_load_version_2
cm = tl.add_class RDoc::NormalClass, 'Klass'
section = cm.sections.first
- loaded = Marshal.load "\x04\bU:\x0FRDoc::Attr[\ri\aI\"\tattr\x06" \
- ":\x06ETI\"\x0FKlass#attr\x06;\x06TI\"\aRW\x06" \
- ";\x06T:\vpublico:\eRDoc::Markup::Document\a" \
- ":\v@parts[\x06o:\x1CRDoc::Markup::Paragraph\x06;" \
- "\t[\x06I\"\x16this is a comment\x06;\x06T:\n" \
+ loaded = Marshal.load "\x04\bU:\x0FRDoc::Attr[\ri\aI\"\tattr\x06" +
+ ":\x06ETI\"\x0FKlass#attr\x06;\x06TI\"\aRW\x06" +
+ ";\x06T:\vpublico:\eRDoc::Markup::Document\a" +
+ ":\v@parts[\x06o:\x1CRDoc::Markup::Paragraph\x06;" +
+ "\t[\x06I\"\x16this is a comment\x06;\x06T:\n" +
"@file0FI\"\ffile.rb\x06;\x06T"
loaded.store = @store
View
156 test/test_rdoc_class_module.rb
@@ -219,17 +219,17 @@ def test_marshal_load_version_0
cm.add_include i
cm.add_comment 'this is a comment', tl
- loaded = Marshal.load "\x04\bU:\x16RDoc::NormalClass[\x0Ei\x00\"\nKlass" \
- "\"\x15Namespace::KlassI\"\nSuper\x06:\x06EF" \
- "o:\eRDoc::Markup::Document\x06:\v@parts[\x06" \
- "o:\x1CRDoc::Markup::Paragraph\x06;\b[\x06I" \
- "\"\x16this is a comment\x06;\x06F[\x06[\aI" \
- "\"\aa1\x06;\x06FI\"\aRW\x06;\x06F[\x06[\aI" \
- "\"\aC1\x06;\x06Fo;\a\x06;\b[\x00[\x06[\aI" \
- "\"\aI1\x06;\x06Fo;\a\x06;\b[\x00[\a[\aI" \
- "\"\nclass\x06;\x06F[\b[\a:\vpublic[\x00[\a" \
- ":\x0Eprotected[\x00[\a:\fprivate[\x00[\aI" \
- "\"\rinstance\x06;\x06F[\b[\a;\n[\x06I" \
+ loaded = Marshal.load "\x04\bU:\x16RDoc::NormalClass[\x0Ei\x00\"\nKlass" +
+ "\"\x15Namespace::KlassI\"\nSuper\x06:\x06EF" +
+ "o:\eRDoc::Markup::Document\x06:\v@parts[\x06" +
+ "o:\x1CRDoc::Markup::Paragraph\x06;\b[\x06I" +
+ "\"\x16this is a comment\x06;\x06F[\x06[\aI" +
+ "\"\aa1\x06;\x06FI\"\aRW\x06;\x06F[\x06[\aI" +
+ "\"\aC1\x06;\x06Fo;\a\x06;\b[\x00[\x06[\aI" +
+ "\"\aI1\x06;\x06Fo;\a\x06;\b[\x00[\a[\aI" +
+ "\"\nclass\x06;\x06F[\b[\a:\vpublic[\x00[\a" +
+ ":\x0Eprotected[\x00[\a:\fprivate[\x00[\aI" +
+ "\"\rinstance\x06;\x06F[\b[\a;\n[\x06I" +
"\"\am1\x06;\x06F[\a;\v[\x00[\a;\f[\x00"
loaded.store = @store
@@ -287,20 +287,20 @@ def test_marshal_load_version_1
cm.add_include i1
cm.add_comment 'this is a comment', tl
- loaded = Marshal.load "\x04\bU:\x16RDoc::NormalClass[\x0Ei\x06I\"\nKlass" \
- "\x06:\x06EFI\"\x15Namespace::Klass\x06;\x06FI" \
- "\"\nSuper\x06;\x06Fo:\eRDoc::Markup::Document\a" \
- ":\v@parts[\x06o;\a\a;\b[\x06o" \
- ":\x1CRDoc::Markup::Paragraph\x06;\b" \
- "[\x06I\"\x16this is a comment\x06;\x06F" \
- ":\n@fileI\"\ffile.rb\x06;\x06F;\n0[\a[\nI" \
- "\"\aa2\x06;\x06FI\"\aRW\x06;\x06F:\vpublicT@\x11" \
- "[\nI\"\aa1\x06;\x06FI\"\aRW\x06;\x06F;\vF@\x11" \
- "[\x06[\bI\"\aC1\x06;\x06Fo;\a\a;\b[\x00;\n0@\x11" \
- "[\x06[\bI\"\aI1\x06;\x06Fo;\a\a;\b[\x00;\n0@\x11" \
- "[\a[\aI\"\nclass\x06;\x06F[\b[\a;\v[\x00" \
- "[\a:\x0Eprotected[\x00[\a:\fprivate[\x00[\aI" \
- "\"\rinstance\x06;\x06F[\b[\a;\v[\x06[\aI" \
+ loaded = Marshal.load "\x04\bU:\x16RDoc::NormalClass[\x0Ei\x06I\"\nKlass" +
+ "\x06:\x06EFI\"\x15Namespace::Klass\x06;\x06FI" +
+ "\"\nSuper\x06;\x06Fo:\eRDoc::Markup::Document\a" +
+ ":\v@parts[\x06o;\a\a;\b[\x06o" +
+ ":\x1CRDoc::Markup::Paragraph\x06;\b" +
+ "[\x06I\"\x16this is a comment\x06;\x06F" +
+ ":\n@fileI\"\ffile.rb\x06;\x06F;\n0[\a[\nI" +
+ "\"\aa2\x06;\x06FI\"\aRW\x06;\x06F:\vpublicT@\x11" +
+ "[\nI\"\aa1\x06;\x06FI\"\aRW\x06;\x06F;\vF@\x11" +
+ "[\x06[\bI\"\aC1\x06;\x06Fo;\a\a;\b[\x00;\n0@\x11" +
+ "[\x06[\bI\"\aI1\x06;\x06Fo;\a\a;\b[\x00;\n0@\x11" +
+ "[\a[\aI\"\nclass\x06;\x06F[\b[\a;\v[\x00" +
+ "[\a:\x0Eprotected[\x00[\a:\fprivate[\x00[\aI" +
+ "\"\rinstance\x06;\x06F[\b[\a;\v[\x06[\aI" +
"\"\am1\x06;\x06F@\x11[\a;\f[\x00[\a;\r[\x00"
loaded.store = @store
@@ -370,21 +370,21 @@ def test_marshal_load_version_2
cm.add_extend e1
cm.add_comment 'this is a comment', tl
- loaded = Marshal.load "\x04\bU:\x16RDoc::NormalClass[\x0Fi\aI\"\nKlass" \
- "\x06:\x06EFI\"\x15Namespace::Klass\x06;\x06FI" \
- "\"\nSuper\x06;\x06Fo:\eRDoc::Markup::Document\a" \
- ":\v@parts[\x06o;\a\a;\b[\x06o" \
- ":\x1CRDoc::Markup::Paragraph\x06;\b" \
- "[\x06I\"\x16this is a comment\x06;\x06F" \
- ":\n@fileI\"\ffile.rb\x06;\x06F;\n0[\a[\nI" \
- "\"\aa2\x06;\x06FI\"\aRW\x06;\x06F:\vpublicT@\x11" \
- "[\nI\"\aa1\x06;\x06FI\"\aRW\x06;\x06F;\vF@\x11" \
- "[\x06[\bI\"\aC1\x06;\x06Fo;\a\a;\b[\x00;\n0@\x11" \
- "[\x06[\bI\"\aI1\x06;\x06Fo;\a\a;\b[\x00;\n0@\x11" \
- "[\a[\aI\"\nclass\x06;\x06F[\b[\a;\v[\x00" \
- "[\a:\x0Eprotected[\x00[\a:\fprivate[\x00[\aI" \
- "\"\rinstance\x06;\x06F[\b[\a;\v[\x06[\aI" \
- "\"\am1\x06;\x06F@\x11[\a;\f[\x00[\a;\r[\x00" \
+ loaded = Marshal.load "\x04\bU:\x16RDoc::NormalClass[\x0Fi\aI\"\nKlass" +
+ "\x06:\x06EFI\"\x15Namespace::Klass\x06;\x06FI" +
+ "\"\nSuper\x06;\x06Fo:\eRDoc::Markup::Document\a" +
+ ":\v@parts[\x06o;\a\a;\b[\x06o" +
+ ":\x1CRDoc::Markup::Paragraph\x06;\b" +
+ "[\x06I\"\x16this is a comment\x06;\x06F" +
+ ":\n@fileI\"\ffile.rb\x06;\x06F;\n0[\a[\nI" +
+ "\"\aa2\x06;\x06FI\"\aRW\x06;\x06F:\vpublicT@\x11" +
+ "[\nI\"\aa1\x06;\x06FI\"\aRW\x06;\x06F;\vF@\x11" +
+ "[\x06[\bI\"\aC1\x06;\x06Fo;\a\a;\b[\x00;\n0@\x11" +
+ "[\x06[\bI\"\aI1\x06;\x06Fo;\a\a;\b[\x00;\n0@\x11" +
+ "[\a[\aI\"\nclass\x06;\x06F[\b[\a;\v[\x00" +
+ "[\a:\x0Eprotected[\x00[\a:\fprivate[\x00[\aI" +
+ "\"\rinstance\x06;\x06F[\b[\a;\v[\x06[\aI" +
+ "\"\am1\x06;\x06F@\x11[\a;\f[\x00[\a;\r[\x00" +
"[\x06[\bI\"\aE1\x06;\x06Fo;\a\a;\b[\x00;\n0@\x11"
loaded.store = @store
@@ -460,29 +460,29 @@ def test_marshal_load_version_3
cm.add_extend e1
cm.add_comment 'this is a comment', tl
- loaded = Marshal.load "\x04\bU:\x16RDoc::NormalClass[\x13i\bI\"\nKlass" \
- "\x06:\x06ETI\"\x15Namespace::Klass\x06;\x06TI" \
- "\"\nSuper\x06;\x06To:\eRDoc::Markup::Document\a" \
- ":\v@parts[\x06o;\a\a;\b[\x06o" \
- ":\x1CRDoc::Markup::Paragraph\x06;\b[\x06I" \
- "\"\x16this is a comment\x06;\x06T:\n@fileI" \
- "\"\ffile.rb\x06;\x06T;\n0[\a[\nI\"\aa2\x06;" \
- "\x06TI\"\aRW\x06;\x06T:\vpublicT@\x11[\nI" \
- "\"\aa1\x06;\x06TI\"\aRW\x06;\x06T;\vF@\x11" \
- "[\x06U:\x13RDoc::Constant[\x0Fi\x00I\"\aC1\x06" \
- ";\x06TI\"\x19Namespace::Klass::C1\x06;\x06T00o" \
- ";\a\a;\b[\x00;\n0@\x11@\ac\x16RDoc::NormalClass0" \
- "[\x06[\bI\"\aI1\x06;\x06To;\a\a;\b[\x00;\n0@\x11" \
- "[\a[\aI\"\nclass\x06;\x06T[\b[\a;\v[\x00[\a" \
- ":\x0Eprotected[\x00[\a:\fprivate[\x00[\aI" \
- "\"\rinstance\x06;\x06T[\b[\a;\v[\x06[\aI" \
- "\"\am1\x06;\x06T@\x11[\a;\r[\x00[\a;\x0E[\x00" \
- "[\x06[\bI\"\aE1\x06;\x06To;\a\a;\b[\x00;\n0@\x11" \
- "[\aU:\eRDoc::Context::Section[\bi\x000o;\a\a;\b" \
- "[\x00;\n0U;\x0F[\bi\x00I\"\fsection\x06;\x06To" \
- ";\a\a;\b[\x06o;\a\a;\b[\x06o;\t\x06;\b[\x06I" \
- "\"\x14section comment\x06;\x06T;\n@\x11;\n0" \
- "[\x06@\x11I\"\x0ENamespace\x06" \
+ loaded = Marshal.load "\x04\bU:\x16RDoc::NormalClass[\x13i\bI\"\nKlass" +
+ "\x06:\x06ETI\"\x15Namespace::Klass\x06;\x06TI" +
+ "\"\nSuper\x06;\x06To:\eRDoc::Markup::Document\a" +
+ ":\v@parts[\x06o;\a\a;\b[\x06o" +
+ ":\x1CRDoc::Markup::Paragraph\x06;\b[\x06I" +
+ "\"\x16this is a comment\x06;\x06T:\n@fileI" +
+ "\"\ffile.rb\x06;\x06T;\n0[\a[\nI\"\aa2\x06;" +
+ "\x06TI\"\aRW\x06;\x06T:\vpublicT@\x11[\nI" +
+ "\"\aa1\x06;\x06TI\"\aRW\x06;\x06T;\vF@\x11" +
+ "[\x06U:\x13RDoc::Constant[\x0Fi\x00I\"\aC1\x06" +
+ ";\x06TI\"\x19Namespace::Klass::C1\x06;\x06T00o" +
+ ";\a\a;\b[\x00;\n0@\x11@\ac\x16RDoc::NormalClass0" +
+ "[\x06[\bI\"\aI1\x06;\x06To;\a\a;\b[\x00;\n0@\x11" +
+ "[\a[\aI\"\nclass\x06;\x06T[\b[\a;\v[\x00[\a" +
+ ":\x0Eprotected[\x00[\a:\fprivate[\x00[\aI" +
+ "\"\rinstance\x06;\x06T[\b[\a;\v[\x06[\aI" +
+ "\"\am1\x06;\x06T@\x11[\a;\r[\x00[\a;\x0E[\x00" +
+ "[\x06[\bI\"\aE1\x06;\x06To;\a\a;\b[\x00;\n0@\x11" +
+ "[\aU:\eRDoc::Context::Section[\bi\x000o;\a\a;\b" +
+ "[\x00;\n0U;\x0F[\bi\x00I\"\fsection\x06;\x06To" +
+ ";\a\a;\b[\x06o;\a\a;\b[\x06o;\t\x06;\b[\x06I" +
+ "\"\x14section comment\x06;\x06T;\n@\x11;\n0" +
+ "[\x06@\x11I\"\x0ENamespace\x06" +
";\x06Tc\x17RDoc::NormalModule"
loaded.store = @store
@@ -1141,21 +1141,21 @@ def test_search_record_merged
def test_store_equals
# version 2
- loaded = Marshal.load "\x04\bU:\x16RDoc::NormalClass[\x0Fi\aI\"\nKlass" \
- "\x06:\x06EFI\"\x15Namespace::Klass\x06;\x06FI" \
- "\"\nSuper\x06;\x06Fo:\eRDoc::Markup::Document\a" \
- ":\v@parts[\x06o;\a\a;\b[\x06o" \
- ":\x1CRDoc::Markup::Paragraph\x06;\b" \
- "[\x06I\"\x16this is a comment\x06;\x06F" \
- ":\n@fileI\"\ffile.rb\x06;\x06F;\n0[\a[\nI" \
- "\"\aa2\x06;\x06FI\"\aRW\x06;\x06F:\vpublicT@\x11" \
- "[\nI\"\aa1\x06;\x06FI\"\aRW\x06;\x06F;\vF@\x11" \
- "[\x06[\bI\"\aC1\x06;\x06Fo;\a\a;\b[\x00;\n0@\x11" \
- "[\x06[\bI\"\aI1\x06;\x06Fo;\a\a;\b[\x00;\n0@\x11" \
- "[\a[\aI\"\nclass\x06;\x06F[\b[\a;\v[\x00" \
- "[\a:\x0Eprotected[\x00[\a:\fprivate[\x00[\aI" \
- "\"\rinstance\x06;\x06F[\b[\a;\v[\x06[\aI" \
- "\"\am1\x06;\x06F@\x11[\a;\f[\x00[\a;\r[\x00" \
+ loaded = Marshal.load "\x04\bU:\x16RDoc::NormalClass[\x0Fi\aI\"\nKlass" +
+ "\x06:\x06EFI\"\x15Namespace::Klass\x06;\x06FI" +
+ "\"\nSuper\x06;\x06Fo:\eRDoc::Markup::Document\a" +
+ ":\v@parts[\x06o;\a\a;\b[\x06o" +
+ ":\x1CRDoc::Markup::Paragraph\x06;\b" +
+ "[\x06I\"\x16this is a comment\x06;\x06F" +
+ ":\n@fileI\"\ffile.rb\x06;\x06F;\n0[\a[\nI" +
+ "\"\aa2\x06;\x06FI\"\aRW\x06;\x06F:\vpublicT@\x11" +
+ "[\nI\"\aa1\x06;\x06FI\"\aRW\x06;\x06F;\vF@\x11" +
+ "[\x06[\bI\"\aC1\x06;\x06Fo;\a\a;\b[\x00;\n0@\x11" +
+ "[\x06[\bI\"\aI1\x06;\x06Fo;\a\a;\b[\x00;\n0@\x11" +
+ "[\a[\aI\"\nclass\x06;\x06F[\b[\a;\v[\x00" +
+ "[\a:\x0Eprotected[\x00[\a:\fprivate[\x00[\aI" +
+ "\"\rinstance\x06;\x06F[\b[\a;\v[\x06[\aI" +
+ "\"\am1\x06;\x06F@\x11[\a;\f[\x00[\a;\r[\x00" +
"[\x06[\bI\"\aE1\x06;\x06Fo;\a\a;\b[\x00;\n0@\x11"
loaded.store = @store
View
14 test/test_rdoc_constant.rb
@@ -78,13 +78,13 @@ def test_marshal_load_version_0
cm = top_level.add_class RDoc::NormalClass, 'Klass'
section = cm.sections.first
- loaded = Marshal.load "\x04\bU:\x13RDoc::Constant[\x0Fi\x00I" \
- "\"\nCONST\x06:\x06ETI\"\x11Klass::CONST\x06" \
- ";\x06T0I\"\fAliased\x06;\x06To" \
- ":\eRDoc::Markup::Document\a:\v@parts[\x06o" \
- ":\x1CRDoc::Markup::Paragraph\x06;\b[\x06I" \
- "\"\x16this is a comment\x06;\x06T:\n@file0I" \
- "\"\ffile.rb\x06;\x06TI\"\nKlass\x06" \
+ loaded = Marshal.load "\x04\bU:\x13RDoc::Constant[\x0Fi\x00I" +
+ "\"\nCONST\x06:\x06ETI\"\x11Klass::CONST\x06" +
+ ";\x06T0I\"\fAliased\x06;\x06To" +
+ ":\eRDoc::Markup::Document\a:\v@parts[\x06o" +
+ ":\x1CRDoc::Markup::Paragraph\x06;\b[\x06I" +
+ "\"\x16this is a comment\x06;\x06T:\n@file0I" +
+ "\"\ffile.rb\x06;\x06TI\"\nKlass\x06" +
";\x06Tc\x16RDoc::NormalClass0"
loaded.store = @store
View
12 test/test_rdoc_context_section.rb
@@ -84,12 +84,12 @@ def test_marshal_dump_no_comment
end
def test_marshal_load_version_0
- loaded = Marshal.load "\x04\bU:\eRDoc::Context::Section" \
- "[\bi\x00I\"\fsection\x06:\x06EFo" \
- ":\eRDoc::Markup::Document\a:\v@parts" \
- "[\x06o;\a\a;\b[\x06o" \
- ":\x1CRDoc::Markup::Paragraph\x06;\b" \
- "[\x06I\"\fcomment\x06;\x06F:\n@fileI" \
+ loaded = Marshal.load "\x04\bU:\eRDoc::Context::Section" +
+ "[\bi\x00I\"\fsection\x06:\x06EFo" +
+ ":\eRDoc::Markup::Document\a:\v@parts" +
+ "[\x06o;\a\a;\b[\x06o" +
+ ":\x1CRDoc::Markup::Paragraph\x06;\b" +
+ "[\x06I\"\fcomment\x06;\x06F:\n@fileI" +
"\"\ffile.rb\x06;\x06F;\n0"
expected = doc RDoc::Comment.new('comment', @top_level).parse
View
6 test/test_rdoc_markdown.rb
@@ -724,15 +724,15 @@ def test_parse_note_multiple
MD
expected = doc(
- para("Some text{*1}[rdoc-label:foottext-1:footmark-1]\n" \
- "with inline notes{*2}[rdoc-label:foottext-2:footmark-2]\n" \
+ para("Some text{*1}[rdoc-label:foottext-1:footmark-1]\n" +
+ "with inline notes{*2}[rdoc-label:foottext-2:footmark-2]\n" +
"and an extra note.{*3}[rdoc-label:foottext-3:footmark-3]"),
rule(1),
para("{^1}[rdoc-label:footmark-1:foottext-1] With a footnote"),
para("{^2}[rdoc-label:footmark-2:foottext-2] like this"),
- para("{^3}[rdoc-label:footmark-3:foottext-3] " \
+ para("{^3}[rdoc-label:footmark-3:foottext-3] " +
"Which should be numbered correctly"))
assert_equal expected, doc
View
474 test/test_rdoc_markdown_test.rb
@@ -34,9 +34,9 @@ def test_amps_and_angle_encoding
para("This & that."),
para("4 < 5."),
para("6 > 5."),
- para("Here's a {link}[http://example.com/?foo=1&bar=2] with " \
+ para("Here's a {link}[http://example.com/?foo=1&bar=2] with " +
"an ampersand in the URL."),
- para("Here's a link with an amersand in the link text: " \
+ para("Here's a link with an amersand in the link text: " +
"{AT&T}[http://att.com/]."),
para("Here's an inline {link}[/script?foo=1&bar=2]."),
para("Here's an inline {link}[/script?foo=1&bar=2]."))
@@ -60,7 +60,7 @@ def test_auto_links
item(nil, para("It should."))),
block(
para("Blockquoted: http://example.com/")),
- para("Auto-links should not occur here: " \
+ para("Auto-links should not occur here: " +
"<code><http://example.com/></code>"),
verb("or here: <http://example.com/>\n"))
@@ -146,20 +146,20 @@ def test_backslash_escapes
para("Plus: <code>\\+</code>"),
para("Minus: <code>\\-</code>"),
- para("These should get escaped, even though they're matching pairs for\n" \
+ para("These should get escaped, even though they're matching pairs for\n" +
"other Markdown constructs:"),
para("\*asterisks\*"),
para("\_underscores\_"),
para("`backticks`"),
- para("This is a code span with a literal backslash-backtick " \
+ para("This is a code span with a literal backslash-backtick " +
"sequence: <code>\\`</code>"),
- para("This is a tag with unescaped backticks " \
+ para("This is a tag with unescaped backticks " +
"<span attr='`ticks`'>bar</span>."),
- para("This is a tag with backslashes " \
+ para("This is a tag with backslashes " +
"<span attr='\\\\backslashes\\\\'>bar</span>."))
assert_equal expected, doc
@@ -170,7 +170,7 @@ def test_blockquotes_with_code_blocks
doc = @parser.parse input
- expected =
+ expected =
doc(
block(
para("Example:"),
@@ -214,7 +214,7 @@ def test_code_spans
expected = doc(
para("<code><test a=\"</code> content of attribute <code>\"></code>"),
- para("Fix for backticks within HTML tag: " \
+ para("Fix for backticks within HTML tag: " +
"<span attr='`ticks`'>like this</span>"),
para("Here's how you put <code>`backticks`</code> in a code span."))
@@ -228,12 +228,12 @@ def test_hard_wrapped_paragraphs_with_list_like_lines
expected =
doc(
- para("In Markdown 1.0.0 and earlier. Version\n" \
- "8. This line turns into a list item.\n" \
- "Because a hard-wrapped line in the\n" \
- "middle of a paragraph looked like a\n" \
+ para("In Markdown 1.0.0 and earlier. Version\n" +
+ "8. This line turns into a list item.\n" +
+ "Because a hard-wrapped line in the\n" +
+ "middle of a paragraph looked like a\n" +
"list item."),
- para("Here's one with a bullet.\n" \
+ para("Here's one with a bullet.\n" +
"* criminey."))
assert_equal expected, doc
@@ -329,7 +329,7 @@ def test_inline_html_simple
doc(
para("Here's a simple block:"),
raw("<div>\n\tfoo\n</div>"),
-
+
para("This should be a code block, though:"),
verb("<div>\n",
"\tfoo\n",
@@ -339,7 +339,7 @@ def test_inline_html_simple
verb("<div>foo</div>\n"),
para("Now, nested:"),
- raw("<div>\n\t<div>\n\t\t<div>\n\t\t\tfoo\n" \
+ raw("<div>\n\t<div>\n\t\t<div>\n\t\t\tfoo\n" +
"\t\t</div>\n\t</div>\n</div>"),
para("This should just be an HTML comment:"),
@@ -453,7 +453,7 @@ def test_links_reference_style
rule(1),
para("Here's one where the {link breaks}[/url/] across lines."),
- para("Here's another where the {link breaks}[/url/] across lines, " \
+ para("Here's another where the {link breaks}[/url/] across lines, " +
"but with a line-ending space."))
assert_equal expected, doc
@@ -509,32 +509,32 @@ def test_markdown_documentation_basics
head(2, "Getting the Gist of Markdown's Formatting Syntax"),
- para("This page offers a brief overview of what it's like to use Markdown.\n" \
- "The {syntax page}[/projects/markdown/syntax] provides complete, detailed documentation for\n" \
- "every feature, but Markdown should be very easy to pick up simply by\n" \
- "looking at a few examples of it in action. The examples on this page\n" \
- "are written in a before/after style, showing example syntax and the\n" \
+ para("This page offers a brief overview of what it's like to use Markdown.\n" +
+ "The {syntax page}[/projects/markdown/syntax] provides complete, detailed documentation for\n" +
+ "every feature, but Markdown should be very easy to pick up simply by\n" +
+ "looking at a few examples of it in action. The examples on this page\n" +
+ "are written in a before/after style, showing example syntax and the\n" +
"HTML output produced by Markdown."),
- para("It's also helpful to simply try Markdown out; the {Dingus}[/projects/markdown/dingus] is a\n" \
- "web application that allows you type your own Markdown-formatted text\n" \
+ para("It's also helpful to simply try Markdown out; the {Dingus}[/projects/markdown/dingus] is a\n" +
+ "web application that allows you type your own Markdown-formatted text\n" +
"and translate it to XHTML."),
- para("<b>Note:</b> This document is itself written using Markdown; you\n" \
+ para("<b>Note:</b> This document is itself written using Markdown; you\n" +
"can {see the source for it by adding '.text' to the URL}[/projects/markdown/basics.text]."),
head(2, "Paragraphs, Headers, Blockquotes"),
- para("A paragraph is simply one or more consecutive lines of text, separated\n" \
- "by one or more blank lines. (A blank line is any line that looks like a\n" \
- "blank line -- a line containing nothing spaces or tabs is considered\n" \
+ para("A paragraph is simply one or more consecutive lines of text, separated\n" +
+ "by one or more blank lines. (A blank line is any line that looks like a\n" +
+ "blank line -- a line containing nothing spaces or tabs is considered\n" +
"blank.) Normal paragraphs should not be intended with spaces or tabs."),
- para("Markdown offers two styles of headers: _Setext_ and _atx_.\n" \
- "Setext-style headers for <code><h1></code> and <code><h2></code> are created by\n" \
- "\"underlining\" with equal signs (<code>=</code>) and hyphens (<code>-</code>), respectively.\n" \
- "To create an atx-style header, you put 1-6 hash marks (<code>#</code>) at the\n" \
- "beginning of the line -- the number of hashes equals the resulting\n" \
+ para("Markdown offers two styles of headers: _Setext_ and _atx_.\n" +
+ "Setext-style headers for <code><h1></code> and <code><h2></code> are created by\n" +
+ "\"underlining\" with equal signs (<code>=</code>) and hyphens (<code>-</code>), respectively.\n" +
+ "To create an atx-style header, you put 1-6 hash marks (<code>#</code>) at the\n" +
+ "beginning of the line -- the number of hashes equals the resulting\n" +
"HTML header level."),
para("Blockquotes are indicated using email-style '<code>></code>' angle brackets."),
@@ -606,8 +606,8 @@ def test_markdown_documentation_basics
head(2, "Lists"),
- para("Unordered (bulleted) lists use asterisks, pluses, and hyphens (<code>*</code>,\n" \
- "<code>+</code>, and <code>-</code>) as list markers. These three markers are\n" \
+ para("Unordered (bulleted) lists use asterisks, pluses, and hyphens (<code>*</code>,\n" +
+ "<code>+</code>, and <code>-</code>) as list markers. These three markers are\n" +
"interchangable; this:"),
verb("* Candy.\n",
@@ -634,7 +634,7 @@ def test_markdown_documentation_basics
"<li>Booze.</li>\n",
"</ul>\n"),
- para("Ordered (numbered) lists use regular numbers, followed by periods, as\n" \
+ para("Ordered (numbered) lists use regular numbers, followed by periods, as\n" +
"list markers:"),
verb("1. Red\n",
@@ -649,8 +649,8 @@ def test_markdown_documentation_basics
"<li>Blue</li>\n",
"</ol>\n"),
- para("If you put blank lines between items, you'll get <code><p></code> tags for the\n" \
- "list item text. You can create multi-paragraph list items by indenting\n" \
+ para("If you put blank lines between items, you'll get <code><p></code> tags for the\n" +
+ "list item text. You can create multi-paragraph list items by indenting\n" +
"the paragraphs by 4 spaces or 1 tab:"),
verb("* A list item.\n",
@@ -669,11 +669,11 @@ def test_markdown_documentation_basics
head(3, "Links"),
- para("Markdown supports two styles for creating links: _inline_ and\n" \
- "_reference_. With both styles, you use square brackets to delimit the\n" \
+ para("Markdown supports two styles for creating links: _inline_ and\n" +
+ "_reference_. With both styles, you use square brackets to delimit the\n" +
"text you want to turn into a link."),
- para("Inline-style links use parentheses immediately after the link text.\n" \
+ para("Inline-style links use parentheses immediately after the link text.\n" +
"For example:"),
verb("This is an [example link](http://example.com/).\n"),
@@ -692,7 +692,7 @@ def test_markdown_documentation_basics
verb("<p>This is an <a href=\"http://example.com/\" title=\"With a Title\">\n",
"example link</a>.</p>\n"),
- para("Reference-style links allow you to refer to your links by names, which\n" \
+ para("Reference-style links allow you to refer to your links by names, which\n" +
"you define elsewhere in your document:"),
verb("I get 10 times more traffic from [Google][1] than from\n",
@@ -709,7 +709,7 @@ def test_markdown_documentation_basics
"title=\"Yahoo Search\">Yahoo</a> or <a href=\"http://search.msn.com/\"\n",
"title=\"MSN Search\">MSN</a>.</p>\n"),
- para("The title attribute is optional. Link names may contain letters,\n" \
+ para("The title attribute is optional. Link names may contain letters,\n" +
"numbers and spaces, but are _not_ case sensitive:"),
verb("I start my morning with a cup of coffee and\n",
@@ -742,9 +742,9 @@ def test_markdown_documentation_basics
head(3, "Code"),
- para("In a regular paragraph, you can create code span by wrapping text in\n" \
- "backtick quotes. Any ampersands (<code>&</code>) and angle brackets (<code><</code> or\n" \
- "<code>></code>) will automatically be translated into HTML entities. This makes\n" \
+ para("In a regular paragraph, you can create code span by wrapping text in\n" +
+ "backtick quotes. Any ampersands (<code>&</code>) and angle brackets (<code><</code> or\n" +
+ "<code>></code>) will automatically be translated into HTML entities. This makes\n" +
"it easy to use Markdown to write about HTML example code:"),
verb(
@@ -762,8 +762,8 @@ def test_markdown_documentation_basics
"<code>&amp;mdash;</code> instead of decimal-encoded\n",
"entites like <code>&amp;#8212;</code>.</p>\n"),
- para("To specify an entire block of pre-formatted code, indent every line of\n" \
- "the block by 4 spaces or 1 tab. Just like with code spans, <code>&</code>, <code><</code>,\n" \
+ para("To specify an entire block of pre-formatted code, indent every line of\n" +
+ "the block by 4 spaces or 1 tab. Just like with code spans, <code>&</code>, <code><</code>,\n" +
"and <code>></code> characters will be escaped automatically."),
para("Markdown:"),
@@ -811,7 +811,7 @@ def test_markdown_documentation_syntax
item(nil,
para("{Overview}[#overview]"),
list(:BULLET,
- item(nil,
+ item(nil,
para("{Philosophy}[#philosophy]")),
item(nil,
para("{Inline HTML}[#html]")),
@@ -851,7 +851,7 @@ def test_markdown_documentation_syntax
item(nil,
para("{Automatic Links}[#autolink]"))))),
- para("<b>Note:</b> This document is itself written using Markdown; you\n" \
+ para("<b>Note:</b> This document is itself written using Markdown; you\n" +
"can {see the source for it by adding '.text' to the URL}[/projects/markdown/syntax.text]."),
rule(1),
@@ -862,44 +862,44 @@ def test_markdown_documentation_syntax
para("Markdown is intended to be as easy-to-read and easy-to-write as is feasible."),
- para("Readability, however, is emphasized above all else. A Markdown-formatted\n" \
- "document should be publishable as-is, as plain text, without looking\n" \
- "like it's been marked up with tags or formatting instructions. While\n" \
- "Markdown's syntax has been influenced by several existing text-to-HTML\n" \
- "filters -- including {Setext}[http://docutils.sourceforge.net/mirror/setext.html], {atx}[http://www.aaronsw.com/2002/atx/], {Textile}[http://textism.com/tools/textile/], {reStructuredText}[http://docutils.sourceforge.net/rst.html],\n" \
- "{Grutatext}[http://www.triptico.com/software/grutatxt.html], and {EtText}[http://ettext.taint.org/doc/] -- the single biggest source of\n" \
+ para("Readability, however, is emphasized above all else. A Markdown-formatted\n" +
+ "document should be publishable as-is, as plain text, without looking\n" +
+ "like it's been marked up with tags or formatting instructions. While\n" +
+ "Markdown's syntax has been influenced by several existing text-to-HTML\n" +
+ "filters -- including {Setext}[http://docutils.sourceforge.net/mirror/setext.html], {atx}[http://www.aaronsw.com/2002/atx/], {Textile}[http://textism.com/tools/textile/], {reStructuredText}[http://docutils.sourceforge.net/rst.html],\n" +
+ "{Grutatext}[http://www.triptico.com/software/grutatxt.html], and {EtText}[http://ettext.taint.org/doc/] -- the single biggest source of\n" +
"inspiration for Markdown's syntax is the format of plain text email."),
- para("To this end, Markdown's syntax is comprised entirely of punctuation\n" \
- "characters, which punctuation characters have been carefully chosen so\n" \
- "as to look like what they mean. E.g., asterisks around a word actually\n" \
- "look like \*emphasis\*. Markdown lists look like, well, lists. Even\n" \
- "blockquotes look like quoted passages of text, assuming you've ever\n" \
+ para("To this end, Markdown's syntax is comprised entirely of punctuation\n" +
+ "characters, which punctuation characters have been carefully chosen so\n" +
+ "as to look like what they mean. E.g., asterisks around a word actually\n" +
+ "look like \*emphasis\*. Markdown lists look like, well, lists. Even\n" +
+ "blockquotes look like quoted passages of text, assuming you've ever\n" +
"used email."),
raw("<h3 id=\"html\">Inline HTML</h3>"),
- para("Markdown's syntax is intended for one purpose: to be used as a\n" \
+ para("Markdown's syntax is intended for one purpose: to be used as a\n" +
"format for _writing_ for the web."),
- para("Markdown is not a replacement for HTML, or even close to it. Its\n" \
- "syntax is very small, corresponding only to a very small subset of\n" \
- "HTML tags. The idea is _not_ to create a syntax that makes it easier\n" \
- "to insert HTML tags. In my opinion, HTML tags are already easy to\n" \
- "insert. The idea for Markdown is to make it easy to read, write, and\n" \
- "edit prose. HTML is a _publishing_ format; Markdown is a _writing_\n" \
- "format. Thus, Markdown's formatting syntax only addresses issues that\n" \
+ para("Markdown is not a replacement for HTML, or even close to it. Its\n" +
+ "syntax is very small, corresponding only to a very small subset of\n" +
+ "HTML tags. The idea is _not_ to create a syntax that makes it easier\n" +
+ "to insert HTML tags. In my opinion, HTML tags are already easy to\n" +
+ "insert. The idea for Markdown is to make it easy to read, write, and\n" +
+ "edit prose. HTML is a _publishing_ format; Markdown is a _writing_\n" +
+ "format. Thus, Markdown's formatting syntax only addresses issues that\n" +
"can be conveyed in plain text."),
- para("For any markup that is not covered by Markdown's syntax, you simply\n" \
- "use HTML itself. There's no need to preface it or delimit it to\n" \
- "indicate that you're switching from Markdown to HTML; you just use\n" \
+ para("For any markup that is not covered by Markdown's syntax, you simply\n" +
+ "use HTML itself. There's no need to preface it or delimit it to\n" +
+ "indicate that you're switching from Markdown to HTML; you just use\n" +
"the tags."),
- para("The only restrictions are that block-level HTML elements -- e.g. <code><div></code>,\n" \
- "<code><table></code>, <code><pre></code>, <code><p></code>, etc. -- must be separated from surrounding\n" \
- "content by blank lines, and the start and end tags of the block should\n" \
- "not be indented with tabs or spaces. Markdown is smart enough not\n" \
+ para("The only restrictions are that block-level HTML elements -- e.g. <code><div></code>,\n" +
+ "<code><table></code>, <code><pre></code>, <code><p></code>, etc. -- must be separated from surrounding\n" +
+ "content by blank lines, and the start and end tags of the block should\n" +
+ "not be indented with tabs or spaces. Markdown is smart enough not\n" +
"to add extra (unwanted) <code><p></code> tags around HTML block-level tags."),
para("For example, to add an HTML table to a Markdown article:"),
@@ -914,29 +914,29 @@ def test_markdown_documentation_syntax
"\n",
"This is another regular paragraph.\n"),
- para("Note that Markdown formatting syntax is not processed within block-level\n" \
- "HTML tags. E.g., you can't use Markdown-style <code>*emphasis*</code> inside an\n" \
+ para("Note that Markdown formatting syntax is not processed within block-level\n" +
+ "HTML tags. E.g., you can't use Markdown-style <code>*emphasis*</code> inside an\n" +
"HTML block."),
-
- para("Span-level HTML tags -- e.g. <code><span></code>, <code><cite></code>, or <code><del></code> -- can be\n" \
- "used anywhere in a Markdown paragraph, list item, or header. If you\n" \
- "want, you can even use HTML tags instead of Markdown formatting; e.g. if\n" \
- "you'd prefer to use HTML <code><a></code> or <code><img></code> tags instead of Markdown's\n" \
+
+ para("Span-level HTML tags -- e.g. <code><span></code>, <code><cite></code>, or <code><del></code> -- can be\n" +
+ "used anywhere in a Markdown paragraph, list item, or header. If you\n" +
+ "want, you can even use HTML tags instead of Markdown formatting; e.g. if\n" +
+ "you'd prefer to use HTML <code><a></code> or <code><img></code> tags instead of Markdown's\n" +
"link or image syntax, go right ahead."),
- para("Unlike block-level HTML tags, Markdown syntax _is_ processed within\n" \
+ para("Unlike block-level HTML tags, Markdown syntax _is_ processed within\n" +
"span-level tags."),
raw("<h3 id=\"autoescape\">Automatic Escaping for Special Characters</h3>"),
- para("In HTML, there are two characters that demand special treatment: <code><</code>\n" \
- "and <code>&</code>. Left angle brackets are used to start tags; ampersands are\n" \
- "used to denote HTML entities. If you want to use them as literal\n" \
- "characters, you must escape them as entities, e.g. <code>&lt;</code>, and\n" \
+ para("In HTML, there are two characters that demand special treatment: <code><</code>\n" +
+ "and <code>&</code>. Left angle brackets are used to start tags; ampersands are\n" +
+ "used to denote HTML entities. If you want to use them as literal\n" +
+ "characters, you must escape them as entities, e.g. <code>&lt;</code>, and\n" +
"<code>&amp;</code>."),
-
- para("Ampersands in particular are bedeviling for web writers. If you want to\n" \
- "write about 'AT&T', you need to write '<code>AT&amp;T</code>'. You even need to\n" \
+
+ para("Ampersands in particular are bedeviling for web writers. If you want to\n" +
+ "write about 'AT&T', you need to write '<code>AT&amp;T</code>'. You even need to\n" +
"escape ampersands within URLs. Thus, if you want to link to:"),
verb("http://images.google.com/images?num=30&q=larry+bird\n"),
@@ -945,15 +945,15 @@ def test_markdown_documentation_syntax
verb("http://images.google.com/images?num=30&amp;q=larry+bird\n"),
- para("in your anchor tag <code>href</code> attribute. Needless to say, this is easy to\n" \
- "forget, and is probably the single most common source of HTML validation\n" \
+ para("in your anchor tag <code>href</code> attribute. Needless to say, this is easy to\n" +
+ "forget, and is probably the single most common source of HTML validation\n" +
"errors in otherwise well-marked-up web sites."),
-
- para("Markdown allows you to use these characters naturally, taking care of\n" \
- "all the necessary escaping for you. If you use an ampersand as part of\n" \
- "an HTML entity, it remains unchanged; otherwise it will be translated\n" \
+
+ para("Markdown allows you to use these characters naturally, taking care of\n" +
+ "all the necessary escaping for you. If you use an ampersand as part of\n" +
+ "an HTML entity, it remains unchanged; otherwise it will be translated\n" +
"into <code>&amp;</code>."),
-
+
para("So, if you want to include a copyright symbol in your article, you can write:"),
verb("&copy;\n"),
@@ -966,8 +966,8 @@ def test_markdown_documentation_syntax
verb("AT&amp;T\n"),
- para("Similarly, because Markdown supports {inline HTML}[#html], if you use\n" \
- "angle brackets as delimiters for HTML tags, Markdown will treat them as\n" \
+ para("Similarly, because Markdown supports {inline HTML}[#html], if you use\n" +
+ "angle brackets as delimiters for HTML tags, Markdown will treat them as\n" +
"such. But if you write:"),
verb("4 < 5\n"),
@@ -976,10 +976,10 @@ def test_markdown_documentation_syntax
verb("4 &lt; 5\n"),
- para("However, inside Markdown code spans and blocks, angle brackets and\n" \
- "ampersands are _always_ encoded automatically. This makes it easy to use\n" \
- "Markdown to write about HTML code. (As opposed to raw HTML, which is a\n" \
- "terrible format for writing about HTML syntax, because every single <code><</code>\n" \
+ para("However, inside Markdown code spans and blocks, angle brackets and\n" +
+ "ampersands are _always_ encoded automatically. This makes it easy to use\n" +
+ "Markdown to write about HTML code. (As opposed to raw HTML, which is a\n" +
+ "terrible format for writing about HTML syntax, because every single <code><</code>\n" +
"and <code>&</code> in your example code needs to be escaped.)"),
rule(1),
@@ -988,30 +988,30 @@ def test_markdown_documentation_syntax
raw("<h3 id=\"p\">Paragraphs and Line Breaks</h3>"),
- para("A paragraph is simply one or more consecutive lines of text, separated\n" \
- "by one or more blank lines. (A blank line is any line that looks like a\n" \
- "blank line -- a line containing nothing but spaces or tabs is considered\n" \
+ para("A paragraph is simply one or more consecutive lines of text, separated\n" +
+ "by one or more blank lines. (A blank line is any line that looks like a\n" +
+ "blank line -- a line containing nothing but spaces or tabs is considered\n" +
"blank.) Normal paragraphs should not be intended with spaces or tabs."),
- para("The implication of the \"one or more consecutive lines of text\" rule is\n" \
- "that Markdown supports \"hard-wrapped\" text paragraphs. This differs\n" \
- "significantly from most other text-to-HTML formatters (including Movable\n" \
- "Type's \"Convert Line Breaks\" option) which translate every line break\n" \
+ para("The implication of the \"one or more consecutive lines of text\" rule is\n" +
+ "that Markdown supports \"hard-wrapped\" text paragraphs. This differs\n" +
+ "significantly from most other text-to-HTML formatters (including Movable\n" +
+ "Type's \"Convert Line Breaks\" option) which translate every line break\n" +
"character in a paragraph into a <code><br /></code> tag."),
- para("When you _do_ want to insert a <code><br /></code> break tag using Markdown, you\n" \
+ para("When you _do_ want to insert a <code><br /></code> break tag using Markdown, you\n" +
"end a line with two or more spaces, then type return."),
- para("Yes, this takes a tad more effort to create a <code><br /></code>, but a simplistic\n" \
- "\"every line break is a <code><br /></code>\" rule wouldn't work for Markdown.\n" \
- "Markdown's email-style {blockquoting}[#blockquote] and multi-paragraph {list items}[#list]\n" \
+ para("Yes, this takes a tad more effort to create a <code><br /></code>, but a simplistic\n" +
+ "\"every line break is a <code><br /></code>\" rule wouldn't work for Markdown.\n" +
+ "Markdown's email-style {blockquoting}[#blockquote] and multi-paragraph {list items}[#list]\n" +
"work best -- and look better -- when you format them with hard breaks."),
raw("<h3 id=\"header\">Headers</h3>"),
para("Markdown supports two styles of headers, {Setext}[http://docutils.sourceforge.net/mirror/setext.html] and {atx}[http://www.aaronsw.com/2002/atx/]."),
- para("Setext-style headers are \"underlined\" using equal signs (for first-level\n" \
+ para("Setext-style headers are \"underlined\" using equal signs (for first-level\n" +
"headers) and dashes (for second-level headers). For example:"),
verb("This is an H1\n",
@@ -1022,7 +1022,7 @@ def test_markdown_documentation_syntax
para("Any number of underlining <code>=</code>'s or <code>-</code>'s will work."),
- para("Atx-style headers use 1-6 hash characters at the start of the line,\n" \
+ para("Atx-style headers use 1-6 hash characters at the start of the line,\n" +
"corresponding to header levels 1-6. For example:"),
verb("# This is an H1\n",
@@ -1031,10 +1031,10 @@ def test_markdown_documentation_syntax
"\n",
"###### This is an H6\n"),
- para("Optionally, you may \"close\" atx-style headers. This is purely\n" \
- "cosmetic -- you can use this if you think it looks better. The\n" \
- "closing hashes don't even need to match the number of hashes\n" \
- "used to open the header. (The number of opening hashes\n" \
+ para("Optionally, you may \"close\" atx-style headers. This is purely\n" +
+ "cosmetic -- you can use this if you think it looks better. The\n" +
+ "closing hashes don't even need to match the number of hashes\n" +
+ "used to open the header. (The number of opening hashes\n" +
"determines the header level.) :"),
verb("# This is an H1 #\n",
@@ -1046,9 +1046,9 @@ def test_markdown_documentation_syntax
raw("<h3 id=\"blockquote\">Blockquotes</h3>"),
para(
- "Markdown uses email-style <code>></code> characters for blockquoting. If you're\n" \
- "familiar with quoting passages of text in an email message, then you\n" \
- "know how to create a blockquote in Markdown. It looks best if you hard\n" \
+ "Markdown uses email-style <code>></code> characters for blockquoting. If you're\n" +
+ "familiar with quoting passages of text in an email message, then you\n" +
+ "know how to create a blockquote in Markdown. It looks best if you hard\n" +
"wrap the text and put a <code>></code> before every line:"),
verb("> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,\n",
@@ -1058,7 +1058,7 @@ def test_markdown_documentation_syntax
"> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse\n",
"> id sem consectetuer libero luctus adipiscing.\n"),
- para("Markdown allows you to be lazy and only put the <code>></code> before the first\n" \
+ para("Markdown allows you to be lazy and only put the <code>></code> before the first\n" +
"line of a hard-wrapped paragraph:"),
verb("> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,\n",
@@ -1068,7 +1068,7 @@ def test_markdown_documentation_syntax
"> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse\n",
"id sem consectetuer libero luctus adipiscing.\n"),
- para("Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by\n" \
+ para("Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by\n" +
"adding additional levels of <code>></code>:"),
verb("> This is the first level of quoting.\n",
@@ -1077,7 +1077,7 @@ def test_markdown_documentation_syntax
">\n",
"> Back to the first level.\n"),
- para("Blockquotes can contain other Markdown elements, including headers, lists,\n" \
+ para("Blockquotes can contain other Markdown elements, including headers, lists,\n" +
"and code blocks:"),
verb("> ## This is a header.\n",
@@ -1089,15 +1089,15 @@ def test_markdown_documentation_syntax
"> \n",
"> return shell_exec(\"echo $input | $markdown_script\");\n"),
- para("Any decent text editor should make email-style quoting easy. For\n" \
- "example, with BBEdit, you can make a selection and choose Increase\n" \
+ para("Any decent text editor should make email-style quoting easy. For\n" +
+ "example, with BBEdit, you can make a selection and choose Increase\n" +
"Quote Level from the Text menu."),
raw("<h3 id=\"list\">Lists</h3>"),
para("Markdown supports ordered (numbered) and unordered (bulleted) lists."),
- para("Unordered lists use asterisks, pluses, and hyphens -- interchangably\n" \
+ para("Unordered lists use asterisks, pluses, and hyphens -- interchangably\n" +
"-- as list markers:"),
verb("* Red\n",
@@ -1105,27 +1105,27 @@ def test_markdown_documentation_syntax
"* Blue\n"),
para("is equivalent to:"),
-
+
verb("+ Red\n",
"+ Green\n",
"+ Blue\n"),
-
+
para("and:"),
-
+
verb("- Red\n",
"- Green\n",
"- Blue\n"),
-
+
para("Ordered lists use numbers followed by periods:"),
-
+
verb("1. Bird\n",
"2. McHale\n",
"3. Parish\n"),
-
- para("It's important to note that the actual numbers you use to mark the\n" \
- "list have no effect on the HTML output Markdown produces. The HTML\n" \
+
+ para("It's important to note that the actual numbers you use to mark the\n" +
+ "list have no effect on the HTML output Markdown produces. The HTML\n" +
"Markdown produces from the above list is:"),
-
+
verb("<ol>\n",
"<li>Bird</li>\n",
"<li>McHale</li>\n",
@@ -1144,19 +1144,19 @@ def test_markdown_documentation_syntax
"1. McHale\n",
"8. Parish\n"),
- para("you'd get the exact same HTML output. The point is, if you want to,\n" \
- "you can use ordinal numbers in your ordered Markdown lists, so that\n" \
- "the numbers in your source match the numbers in your published HTML.\n" \
+ para("you'd get the exact same HTML output. The point is, if you want to,\n" +
+ "you can use ordinal numbers in your ordered Markdown lists, so that\n" +
+ "the numbers in your source match the numbers in your published HTML.\n" +
"But if you want to be lazy, you don't have to."),
-
- para("If you do use lazy list numbering, however, you should still start the\n" \
- "list with the number 1. At some point in the future, Markdown may support\n" \
+
+ para("If you do use lazy list numbering, however, you should still start the\n" +
+ "list with the number 1. At some point in the future, Markdown may support\n" +
"starting ordered lists at an arbitrary number."),
-
- para("List markers typically start at the left margin, but may be indented by\n" \
- "up to three spaces. List markers must be followed by one or more spaces\n" \
+
+ para("List markers typically start at the left margin, but may be indented by\n" +
+ "up to three spaces. List markers must be followed by one or more spaces\n" +
"or a tab."),
-
+
para("To make lists look nice, you can wrap items with hanging indents:"),
verb("* Lorem ipsum dolor sit amet, consectetuer adipiscing elit.\n",
@@ -1173,7 +1173,7 @@ def test_markdown_documentation_syntax
"* Donec sit amet nisl. Aliquam semper ipsum sit amet velit.\n",
"Suspendisse id sem consectetuer libero luctus adipiscing.\n"),
- para("If list items are separated by blank lines, Markdown will wrap the\n" \
+ para("If list items are separated by blank lines, Markdown will wrap the\n" +
"items in <code><p></code> tags in the HTML output. For example, this input:"),
verb("* Bird\n",
@@ -1199,8 +1199,8 @@ def test_markdown_documentation_syntax
"<li><p>Magic</p></li>\n",
"</ul>\n"),
- para("List items may consist of multiple paragraphs. Each subsequent\n" \
- "paragraph in a list item must be intended by either 4 spaces\n" \
+ para("List items may consist of multiple paragraphs. Each subsequent\n" +
+ "paragraph in a list item must be intended by either 4 spaces\n" +
"or one tab:"),
verb("1. This is a list item with two paragraphs. Lorem ipsum dolor\n",
@@ -1213,8 +1213,8 @@ def test_markdown_documentation_syntax
"\n",
"2. Suspendisse id sem consectetuer libero luctus adipiscing.\n"),
- para("It looks nice if you indent every line of the subsequent\n" \
- "paragraphs, but here again, Markdown will allow you to be\n" \
+ para("It looks nice if you indent every line of the subsequent\n" +
+ "paragraphs, but here again, Markdown will allow you to be\n" +
"lazy:"),
verb("* This is a list item with two paragraphs.\n",
@@ -1225,7 +1225,7 @@ def test_markdown_documentation_syntax
"\n",
"* Another item in the same list.\n"),
- para("To put a blockquote within a list item, the blockquote's <code>></code>\n" \
+ para("To put a blockquote within a list item, the blockquote's <code>></code>\n" +
"delimiters need to be indented:"),
verb("* A list item with a blockquote:\n",
@@ -1234,31 +1234,31 @@ def test_markdown_documentation_syntax
" > inside a list item.\n"),
para(
- "To put a code block within a list item, the code block needs\n" \
+ "To put a code block within a list item, the code block needs\n" +
"to be indented _twice_ -- 8 spaces or two tabs:"),
verb("* A list item with a code block:\n",
"\n",
" <code goes here>\n"),
- para("It's worth noting that it's possible to trigger an ordered list by\n" \
+ para("It's worth noting that it's possible to trigger an ordered list by\n" +
"accident, by writing something like this:"),
verb("1986. What a great season.\n"),
- para("In other words, a <em>number-period-space</em> sequence at the beginning of a\n" \
+ para("In other words, a <em>number-period-space</em> sequence at the beginning of a\n" +
"line. To avoid this, you can backslash-escape the period:"),
verb("1986\\. What a great season.\n"),
raw("<h3 id=\"precode\">Code Blocks</h3>"),
- para("Pre-formatted code blocks are used for writing about programming or\n" \
- "markup source code. Rather than forming normal paragraphs, the lines\n" \
- "of a code block are interpreted literally. Markdown wraps a code block\n" \
+ para("Pre-formatted code blocks are used for writing about programming or\n" +
+ "markup source code. Rather than forming normal paragraphs, the lines\n" +
+ "of a code block are interpreted literally. Markdown wraps a code block\n" +
"in both <code><pre></code> and <code><code></code> tags."),
- para("To produce a code block in Markdown, simply indent every line of the\n" \
+ para("To produce a code block in Markdown, simply indent every line of the\n" +
"block by at least 4 spaces or 1 tab. For example, given this input:"),
verb("This is a normal paragraph:\n",
@@ -1272,7 +1272,7 @@ def test_markdown_documentation_syntax
"<pre><code>This is a code block.\n",
"</code></pre>\n"),
- para("One level of indentation -- 4 spaces or 1 tab -- is removed from each\n" \
+ para("One level of indentation -- 4 spaces or 1 tab -- is removed from each\n" +
"line of the code block. For example, this:"),
verb("Here is an example of AppleScript:\n",
@@ -1290,13 +1290,13 @@ def test_markdown_documentation_syntax
"end tell\n",
"</code></pre>\n"),
- para("A code block continues until it reaches a line that is not indented\n" \
+ para("A code block continues until it reaches a line that is not indented\n" +
"(or the end of the article)."),
- para("Within a code block, ampersands (<code>&</code>) and angle brackets (<code><</code> and <code>></code>)\n" \
- "are automatically converted into HTML entities. This makes it very\n" \
- "easy to include example HTML source code using Markdown -- just paste\n" \
- "it and indent it, and Markdown will handle the hassle of encoding the\n" \
+ para("Within a code block, ampersands (<code>&</code>) and angle brackets (<code><</code> and <code>></code>)\n" +
+ "are automatically converted into HTML entities. This makes it very\n" +
+ "easy to include example HTML source code using Markdown -- just paste\n" +
+ "it and indent it, and Markdown will handle the hassle of encoding the\n" +
"ampersands and angle brackets. For example, this:"),
verb(" <div class=\"footer\">\n",
@@ -1310,15 +1310,15 @@ def test_markdown_documentation_syntax
"&lt;/div&gt;\n",
"</code></pre>\n"),
- para("Regular Markdown syntax is not processed within code blocks. E.g.,\n" \
- "asterisks are just literal asterisks within a code block. This means\n" \
+ para("Regular Markdown syntax is not processed within code blocks. E.g.,\n" +
+ "asterisks are just literal asterisks within a code block. This means\n" +
"it's also easy to use Markdown to write about Markdown's own syntax."),
raw("<h3 id=\"hr\">Horizontal Rules</h3>"),
- para("You can produce a horizontal rule tag (<code><hr /></code>) by placing three or\n" \
- "more hyphens, asterisks, or underscores on a line by themselves. If you\n" \
- "wish, you may use spaces between the hyphens or asterisks. Each of the\n" \
+ para("You can produce a horizontal rule tag (<code><hr /></code>) by placing three or\n" +
+ "more hyphens, asterisks, or underscores on a line by themselves. If you\n" +
+ "wish, you may use spaces between the hyphens or asterisks. Each of the\n" +
"following lines will produce a horizontal rule:"),
verb("* * *\n",
@@ -1343,9 +1343,9 @@ def test_markdown_documentation_syntax
para("In both styles, the link text is delimited by [square brackets]."),
- para("To create an inline link, use a set of regular parentheses immediately\n" \
- "after the link text's closing square bracket. Inside the parentheses,\n" \
- "put the URL where you want the link to point, along with an _optional_\n" \
+ para("To create an inline link, use a set of regular parentheses immediately\n" +
+ "after the link text's closing square bracket. Inside the parentheses,\n" +
+ "put the URL where you want the link to point, along with an _optional_\n" +
"title for the link, surrounded in quotes. For example:"),
verb("This is [an example](http://example.com/ \"Title\") inline link.\n",
@@ -1360,12 +1360,12 @@ def test_markdown_documentation_syntax
"<p><a href=\"http://example.net/\">This link</a> has no\n",
"title attribute.</p>\n"),
- para("If you're referring to a local resource on the same server, you can\n" \
+ para("If you're referring to a local resource on the same server, you can\n" +
"use relative paths:"),
verb("See my [About](/about/) page for details.\n"),
- para("Reference-style links use a second set of square brackets, inside\n" \
+ para("Reference-style links use a second set of square brackets, inside\n" +
"which you place a label of your choosing to identify the link:"),
verb("This is [an example][id] reference-style link.\n"),
@@ -1374,7 +1374,7 @@ def test_markdown_documentation_syntax
verb("This is [an example] [id] reference-style link.\n"),
- para("Then, anywhere in the document, you define your link label like this,\n" \
+ para("Then, anywhere in the document, you define your link label like this,\n" +
"on a line by itself:"),
verb("[id]: http://example.com/ \"Optional Title Here\"\n"),
@@ -1383,7 +1383,7 @@ def test_markdown_documentation_syntax
list(:BULLET,
item(nil,
- para("Square brackets containing the link identifier (optionally\n" \
+ para("Square brackets containing the link identifier (optionally\n" +
"indented from the left margin using up to three spaces);")),
item(nil,
para("followed by a colon;")),
@@ -1392,20 +1392,20 @@ def test_markdown_documentation_syntax
item(nil,
para("followed by the URL for the link;")),
item(nil,
- para("optionally followed by a title attribute for the link, enclosed\n" \
+ para("optionally followed by a title attribute for the link, enclosed\n" +
"in double or single quotes."))),
para("The link URL may, optionally, be surrounded by angle brackets:"),
verb("[id]: <http://example.com/> \"Optional Title Here\"\n"),
- para("You can put the title attribute on the next line and use extra spaces\n" \
+ para("You can put the title attribute on the next line and use extra spaces\n" +
"or tabs for padding, which tends to look better with longer URLs:"),
verb("[id]: http://example.com/longish/path/to/resource/here\n",
" \"Optional Title Here\"\n"),
- para("Link definitions are only used for creating links during Markdown\n" \
+ para("Link definitions are only used for creating links during Markdown\n" +
"processing, and are stripped from your document in the HTML output."),
para("Link definition names may constist of letters, numbers, spaces, and punctuation -- but they are _not_ case sensitive. E.g. these two links:"),
@@ -1415,9 +1415,9 @@ def test_markdown_documentation_syntax
para("are equivalent."),
- para("The <em>implicit link name</em> shortcut allows you to omit the name of the\n" \
- "link, in which case the link text itself is used as the name.\n" \
- "Just use an empty set of square brackets -- e.g., to link the word\n" \
+ para("The <em>implicit link name</em> shortcut allows you to omit the name of the\n" +
+ "link, in which case the link text itself is used as the name.\n" +
+ "Just use an empty set of square brackets -- e.g., to link the word\n" +
"\"Google\" to the google.com web site, you could simply write:"),
verb("[Google][]\n"),
@@ -1426,19 +1426,19 @@ def test_markdown_documentation_syntax
verb("[Google]: http://google.com/\n"),
- para("Because link names may contain spaces, this shortcut even works for\n" \
+ para("Because link names may contain spaces, this shortcut even works for\n" +
"multiple words in the link text:"),
-
+
verb("Visit [Daring Fireball][] for more information.\n"),
para("And then define the link:"),
-
+
verb("[Daring Fireball]: http://daringfireball.net/\n"),
- para("Link definitions can be placed anywhere in your Markdown document. I\n" \
- "tend to put them immediately after each paragraph in which they're\n" \
- "used, but if you want, you can put them all at the end of your\n" \
+ para("Link definitions can be placed anywhere in your Markdown document. I\n" +
+ "tend to put them immediately after each paragraph in which they're\n" +
+ "used, but if you want, you can put them all at the end of your\n" +
"document, sort of like footnotes."),
para("Here's an example of reference links in action:"),
@@ -1466,32 +1466,32 @@ def test_markdown_documentation_syntax
"<a href=\"http://search.yahoo.com/\" title=\"Yahoo Search\">Yahoo</a>\n",
"or <a href=\"http://search.msn.com/\" title=\"MSN Search\">MSN</a>.</p>\n"),
- para("For comparison, here is the same paragraph written using\n" \
+ para("For comparison, here is the same paragraph written using\n" +
"Markdown's inline link style:"),
verb("I get 10 times more traffic from [Google](http://google.com/ \"Google\")\n",
"than from [Yahoo](http://search.yahoo.com/ \"Yahoo Search\") or\n",
"[MSN](http://search.msn.com/ \"MSN Search\").\n"),
- para("The point of reference-style links is not that they're easier to\n" \
- "write. The point is that with reference-style links, your document\n" \
- "source is vastly more readable. Compare the above examples: using\n" \
- "reference-style links, the paragraph itself is only 81 characters\n" \
- "long; with inline-style links, it's 176 characters; and as raw HTML,\n" \
- "it's 234 characters. In the raw HTML, there's more markup than there\n" \
+ para("The point of reference-style links is not that they're easier to\n" +
+ "write. The point is that with reference-style links, your document\n" +
+ "source is vastly more readable. Compare the above examples: using\n" +
+ "reference-style links, the paragraph itself is only 81 characters\n" +
+ "long; with inline-style links, it's 176 characters; and as raw HTML,\n" +
+ "it's 234 characters. In the raw HTML, there's more markup than there\n" +
"is text."),
- para("With Markdown's reference-style links, a source document much more\n" \
- "closely resembles the final output, as rendered in a browser. By\n" \
- "allowing you to move the markup-related metadata out of the paragraph,\n" \
- "you can add links without interrupting the narrative flow of your\n" \
+ para("With Markdown's reference-style links, a source document much more\n" +
+ "closely resembles the final output, as rendered in a browser. By\n" +
+ "allowing you to move the markup-related metadata out of the paragraph,\n" +
+ "you can add links without interrupting the narrative flow of your\n" +
"prose."),
raw("<h3 id=\"em\">Emphasis</h3>"),
- para("Markdown treats asterisks (<code>*</code>) and underscores (<code>_</code>) as indicators of\n" \
- "emphasis. Text wrapped with one <code>*</code> or <code>_</code> will be wrapped with an\n" \
- "HTML <code><em></code> tag; double <code>*</code>'s or <code>_</code>'s will be wrapped with an HTML\n" \
+ para("Markdown treats asterisks (<code>*</code>) and underscores (<code>_</code>) as indicators of\n" +
+ "emphasis. Text wrapped with one <code>*</code> or <code>_</code> will be wrapped with an\n" +
+ "HTML <code><em></code> tag; double <code>*</code>'s or <code>_</code>'s will be wrapped with an HTML\n" +
"<code><strong></code> tag. E.g., this input:"),
verb("*single asterisks*\n",
@@ -1512,26 +1512,26 @@ def test_markdown_documentation_syntax
"\n",
"<strong>double underscores</strong>\n"),
- para("You can use whichever style you prefer; the lone restriction is that\n" \
+ para("You can use whichever style you prefer; the lone restriction is that\n" +
"the same character must be used to open and close an emphasis span."),
para("Emphasis can be used in the middle of a word:"),
verb("un*fucking*believable\n"),
- para("But if you surround an <code>*</code> or <code>_</code> with spaces, it'll be treated as a\n" \
+ para("But if you surround an <code>*</code> or <code>_</code> with spaces, it'll be treated as a\n" +
"literal asterisk or underscore."),
- para("To produce a literal asterisk or underscore at a position where it\n" \
- "would otherwise be used as an emphasis delimiter, you can backslash\n" \
+ para("To produce a literal asterisk or underscore at a position where it\n" +
+ "would otherwise be used as an emphasis delimiter, you can backslash\n" +
"escape it:"),
verb("\\*this text is surrounded by literal asterisks\\*\n"),
raw("<h3 id=\"code\">Code</h3>"),
- para("To indicate a span of code, wrap it with backtick quotes (<code>`</code>).\n" \
- "Unlike a pre-formatted code block, a code span indicates code within a\n" \
+ para("To indicate a span of code, wrap it with backtick quotes (<code>`</code>).\n" +
+ "Unlike a pre-formatted code block, a code span indicates code within a\n" +
"normal paragraph. For example:"),
verb("Use the `printf()` function.\n"),
@@ -1540,7 +1540,7 @@ def test_markdown_documentation_syntax
verb("<p>Use the <code>printf()</code> function.</p>\n"),
- para("To include a literal backtick character within a code span, you can use\n" \
+ para("To include a literal backtick character within a code span, you can use\n" +
"multiple backticks as the opening and closing delimiters:"),
verb("``There is a literal backtick (`) here.``\n"),
@@ -1549,8 +1549,8 @@ def test_markdown_documentation_syntax
verb("<p><code>There is a literal backtick (`) here.</code></p>\n"),
- para("The backtick delimiters surrounding a code span may include spaces --\n" \
- "one after the opening, one before the closing. This allows you to place\n" \
+ para("The backtick delimiters surrounding a code span may include spaces --\n" +
+ "one after the opening, one before the closing. This allows you to place\n" +
"literal backtick characters at the beginning or end of a code span:"),
verb("A single backtick in a code span: `` ` ``\n",
@@ -1563,8 +1563,8 @@ def test_markdown_documentation_syntax
"\n",
"<p>A backtick-delimited string in a code span: <code>`foo`</code></p>\n"),
- para("With a code span, ampersands and angle brackets are encoded as HTML\n" \
- "entities automatically, which makes it easy to include example HTML\n" \
+ para("With a code span, ampersands and angle brackets are encoded as HTML\n" +
+ "entities automatically, which makes it easy to include example HTML\n" +
"tags. Markdown will turn this:"),
verb("Please don't use any `<blink>` tags.\n"),
@@ -1584,10 +1584,10 @@ def test_markdown_documentation_syntax
raw("<h3 id=\"img\">Images</h3>"),
- para("Admittedly, it's fairly difficult to devise a \"natural\" syntax for\n" \
+ para("Admittedly, it's fairly difficult to devise a \"natural\" syntax for\n" +
"placing images into a plain text document format."),
- para("Markdown uses an image syntax that is intended to resemble the syntax\n" \
+ para("Markdown uses an image syntax that is intended to resemble the syntax\n" +
"for links, allowing for two styles: _inline_ and _reference_."),
para("Inline image syntax looks like this:"),
@@ -1602,24 +1602,24 @@ def test_markdown_documentation_syntax
item(nil,
para("An exclamation mark: <code>!</code>;")),
item(nil,
- para("followed by a set of square brackets, containing the <code>alt</code>\n" \
+ para("followed by a set of square brackets, containing the <code>alt</code>\n" +
"attribute text for the image;")),
item(nil,
- para("followed by a set of parentheses, containing the URL or path to\n" \
- "the image, and an optional <code>title</code> attribute enclosed in double\n" \
+ para("followed by a set of parentheses, containing the URL or path to\n" +
+ "the image, and an optional <code>title</code> attribute enclosed in double\n" +
"or single quotes."))),
para("Reference-style image syntax looks like this:"),
verb("![Alt text][id]\n"),
- para("Where \"id\" is the name of a defined image reference. Image references\n" \
+ para("Where \"id\" is the name of a defined image reference. Image references\n" +
"are defined using syntax identical to link references:"),
verb("[id]: url/to/image \"Optional title attribute\"\n"),
- para("As of this writing, Markdown has no syntax for specifying the\n" \
- "dimensions of an image; if this is important to you, you can simply\n" \
+ para("As of this writing, Markdown has no syntax for specifying the\n" +
+ "dimensions of an image; if this is important to you, you can simply\n" +
"use regular HTML <code><img></code> tags."),
rule(1),
@@ -1631,14 +1631,14 @@ def test_markdown_documentation_syntax
para("Markdown supports a shortcut style for creating \"automatic\" links for URLs and email addresses: simply surround the URL or email address with angle brackets. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this:"),
verb("<http://example.com/>\n"),
-
+
para("Markdown will turn this into:"),
verb("<a href=\"http://example.com/\">http://example.com/</a>\n"),
- para("Automatic links for email addresses work similarly, except that\n" \
- "Markdown will also perform a bit of randomized decimal and hex\n" \
- "entity-encoding to help obscure your address from address-harvesting\n" \
+ para("Automatic links for email addresses work similarly, except that\n" +
+ "Markdown will also perform a bit of randomized decimal and hex\n" +
+ "entity-encoding to help obscure your address from address-harvesting\n" +
"spambots. For example, Markdown will turn this:"),
verb("<address@example.com>\n"),
@@ -1652,17 +1652,17 @@ def test_markdown_documentation_syntax
para("which will render in a browser as a clickable link to \"address@example.com\"."),
- para("(This sort of entity-encoding trick will indeed fool many, if not\n" \
- "most, address-harvesting bots, but it definitely won't fool all of\n" \
- "them. It's better than nothing, but an address published in this way\n" \
+ para("(This sort of entity-encoding trick will indeed fool many, if not\n" +
+ "most, address-harvesting bots, but it definitely won't fool all of\n" +
+ "them. It's better than nothing, but an address published in this way\n" +
"will probably eventually start receiving spam.)"),
raw("<h3 id=\"backslash\">Backslash Escapes</h3>"),
- para("Markdown allows you to use backslash escapes to generate literal\n" \
- "characters which would otherwise have special meaning in Markdown's\n" \
- "formatting syntax. For example, if you wanted to surround a word with\n" \
- "literal asterisks (instead of an HTML <code><em></code> tag), you can backslashes\n" \
+ para("Markdown allows you to use backslash escapes to generate literal\n" +
+ "characters which would otherwise have special meaning in Markdown's\n" +
+ "formatting syntax. For example, if you wanted to surround a word with\n" +
+ "literal asterisks (instead of an HTML <code><em></code> tag), you can backslashes\n" +
"before the asterisks, like this:"),
verb("\\*literal asterisks\\*\n"),
@@ -1775,7 +1775,7 @@ def test_ordered_and_unordered_lists
list(:NUMBER,
item(nil,
para("Item 1, graf one."),
- para("Item 2. graf two. The quick brown fox " \
+ para("Item 2. graf two. The quick brown fox " +
"jumped over the lazy dog's\nback.")),
item(nil, para("Item 2.")),
item(nil, para("Item 3."))),
View
16 test/test_rdoc_store.rb
@@ -440,14 +440,14 @@ def test_load_method_legacy
file = @s.method_file @klass.full_name, @meth.full_name
open file, 'wb' do |io|
- io.write "\x04\bU:\x14RDoc::AnyMethod[\x0Fi\x00I" \
- "\"\vmethod\x06:\x06EF\"\x11Klass#method0:\vpublic" \
- "o:\eRDoc::Markup::Document\x06:\v@parts[\x06" \
- "o:\x1CRDoc::Markup::Paragraph\x06;\t[\x06I" \
- "\"\x16this is a comment\x06;\x06FI" \
- "\"\rcall_seq\x06;\x06FI\"\x0Fsome_block\x06;\x06F" \
- "[\x06[\aI\"\faliased\x06;\x06Fo;\b\x06;\t[\x06" \
- "o;\n\x06;\t[\x06I\"\x12alias comment\x06;\x06FI" \
+ io.write "\x04\bU:\x14RDoc::AnyMethod[\x0Fi\x00I" +
+ "\"\vmethod\x06:\x06EF\"\x11Klass#method0:\vpublic" +
+ "o:\eRDoc::Markup::Document\x06:\v@parts[\x06" +
+ "o:\x1CRDoc::Markup::Paragraph\x06;\t[\x06I" +
+ "\"\x16this is a comment\x06;\x06FI" +
+ "\"\rcall_seq\x06;\x06FI\"\x0Fsome_block\x06;\x06F" +
+ "[\x06[\aI\"\faliased\x06;\x06Fo;\b\x06;\t[\x06" +
+ "o;\n\x06;\t[\x06I\"\x12alias comment\x06;\x06FI" +
"\"\nparam\x06;\x06F"
end
View
10 test/test_rdoc_top_level.rb
@@ -174,11 +174,11 @@ def test_marshal_dump
end
def test_marshal_load_version_0
- loaded = Marshal.load "\x04\bU:\x13RDoc::TopLevel" \
- "[\ti\x00I\"\x0FREADME.txt\x06:\x06EF" \
- "c\x19RDoc::Parser::Simple" \
- "o:\eRDoc::Markup::Document\a:\v@parts" \
- "[\x06o:\x1CRDoc::Markup::Paragraph\x06;\b" \
+ loaded = Marshal.load "\x04\bU:\x13RDoc::TopLevel" +
+ "[\ti\x00I\"\x0FREADME.txt\x06:\x06EF" +
+ "c\x19RDoc::Parser::Simple" +
+ "o:\eRDoc::Markup::Document\a:\v@parts" +
+ "[\x06o:\x1CRDoc::Markup::Paragraph\x06;\b" +
"[\x06I\"\x13This is a page\x06;\x06F:\n@file@\a"
comment = RDoc::Markup::Document.new(

0 comments on commit 1f53185

Please sign in to comment.
Something went wrong with that request. Please try again.