Skip to content

Commit

Permalink
only parse bare lines as paragraphs in first column
Browse files Browse the repository at this point in the history
  • Loading branch information
haarg committed Oct 12, 2016
1 parent d15bc93 commit 05eae04
Show file tree
Hide file tree
Showing 9 changed files with 585 additions and 96 deletions.
36 changes: 30 additions & 6 deletions corpus/dists/Archer.parsed
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,21 @@
"entries" => [
{
"line" => 48,
"raw" => " commit 239829c5d2fd0a15abdbecbe593146c466905c3c\n Author: Masayuki Matsuki <y.songmu\@gmail.com>\n Date: Wed Dec 14 19:13:15 2011 +0900\n\n",
"raw" => " commit 239829c5d2fd0a15abdbecbe593146c466905c3c\n",
"style" => "",
"text" => "commit 239829c5d2fd0a15abdbecbe593146c466905c3c Author: Masayuki Matsuki <y.songmu\@gmail.com> Date: Wed Dec 14 19:13:15 2011 +0900"
"text" => "commit 239829c5d2fd0a15abdbecbe593146c466905c3c"
},
{
"line" => 49,
"raw" => " Author: Masayuki Matsuki <y.songmu\@gmail.com>\n",
"style" => "",
"text" => "Author: Masayuki Matsuki <y.songmu\@gmail.com>"
},
{
"line" => 50,
"raw" => " Date: Wed Dec 14 19:13:15 2011 +0900\n\n",
"style" => "",
"text" => "Date: Wed Dec 14 19:13:15 2011 +0900"
},
{
"line" => 52,
Expand All @@ -218,15 +230,27 @@
},
{
"line" => 54,
"raw" => " File::Rsync::out and File::Rsync::err retruns array in array context,\n and retruns array ref in scalar context.\n\n",
"raw" => " File::Rsync::out and File::Rsync::err retruns array in array context,\n",
"style" => "",
"text" => "File::Rsync::out and File::Rsync::err retruns array in array context, and retruns array ref in scalar context."
"text" => "File::Rsync::out and File::Rsync::err retruns array in array context,"
},
{
"line" => 55,
"raw" => " and retruns array ref in scalar context.\n\n",
"style" => "",
"text" => "and retruns array ref in scalar context."
},
{
"line" => 57,
"raw" => " lib/Archer/Plugin/Rsync.pm | 4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\n",
"raw" => " lib/Archer/Plugin/Rsync.pm | 4 ++--\n",
"style" => "",
"text" => "lib/Archer/Plugin/Rsync.pm | 4 ++--"
},
{
"line" => 58,
"raw" => " 1 files changed, 2 insertions(+), 2 deletions(-)\n\n",
"style" => "",
"text" => "lib/Archer/Plugin/Rsync.pm | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)"
"text" => "1 files changed, 2 insertions(+), 2 deletions(-)"
}
],
"line" => 46,
Expand Down
456 changes: 393 additions & 63 deletions corpus/dists/B-C.parsed

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions corpus/dists/BreadBoard.parsed
Original file line number Diff line number Diff line change
Expand Up @@ -1130,6 +1130,12 @@
{
"date" => "2009-07-29",
"entries" => [
{
"line" => 292,
"raw" => " Add cloning support for containers and services\n",
"style" => "",
"text" => "Add cloning support for containers and services"
},
{
"entries" => [
{
Expand All @@ -1139,10 +1145,10 @@
"text" => "adding tests for this"
}
],
"line" => 292,
"raw" => " Add cloning support for containers and services\n (thanks to jrockway for this)\n",
"line" => 293,
"raw" => " (thanks to jrockway for this)\n",
"style" => "",
"text" => "Add cloning support for containers and services (thanks to jrockway for this)"
"text" => "(thanks to jrockway for this)"
},
{
"entries" => [
Expand Down
10 changes: 8 additions & 2 deletions corpus/dists/Module-Rename.parsed
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,15 @@
"entries" => [
{
"line" => 13,
"raw" => " (ms) Replace \"Foo/Bar\" in files just like \"Foo::Bar\".\n (ms) Replace pm files outside the regular dir structure.\n\n",
"raw" => " (ms) Replace \"Foo/Bar\" in files just like \"Foo::Bar\".\n",
"style" => "",
"text" => "(ms) Replace \"Foo/Bar\" in files just like \"Foo::Bar\". (ms) Replace pm files outside the regular dir structure."
"text" => "(ms) Replace \"Foo/Bar\" in files just like \"Foo::Bar\"."
},
{
"line" => 14,
"raw" => " (ms) Replace pm files outside the regular dir structure.\n\n",
"style" => "",
"text" => "(ms) Replace pm files outside the regular dir structure."
}
],
"line" => 12,
Expand Down
10 changes: 8 additions & 2 deletions corpus/dists/Ubic.parsed
Original file line number Diff line number Diff line change
Expand Up @@ -1821,9 +1821,15 @@
"entries" => [
{
"line" => 362,
"raw" => " MANIFEST up-to-date.\n Small POD improvements.\n\n",
"raw" => " MANIFEST up-to-date.\n",
"style" => "",
"text" => "MANIFEST up-to-date. Small POD improvements."
"text" => "MANIFEST up-to-date."
},
{
"line" => 363,
"raw" => " Small POD improvements.\n\n",
"style" => "",
"text" => "Small POD improvements."
}
],
"line" => 361,
Expand Down
38 changes: 34 additions & 4 deletions corpus/dists/WWW-Mechanize-Cached.parsed
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,21 @@
"entries" => [
{
"line" => 86,
"raw" => " However, if you want to create your own cache object that\n writes to /tmp/FileCache/WWW::Mechanize::Cached, for\n compatibility, you can create it and pass it in.\n\n",
"raw" => " However, if you want to create your own cache object that\n",
"style" => "",
"text" => "However, if you want to create your own cache object that writes to /tmp/FileCache/WWW::Mechanize::Cached, for compatibility, you can create it and pass it in."
"text" => "However, if you want to create your own cache object that"
},
{
"line" => 87,
"raw" => " writes to /tmp/FileCache/WWW::Mechanize::Cached, for\n",
"style" => "",
"text" => "writes to /tmp/FileCache/WWW::Mechanize::Cached, for"
},
{
"line" => 88,
"raw" => " compatibility, you can create it and pass it in.\n\n",
"style" => "",
"text" => "compatibility, you can create it and pass it in."
}
],
"line" => 80,
Expand Down Expand Up @@ -393,9 +405,27 @@
},
{
"line" => 109,
"raw" => " On December 29th, 2003, Iain Truskett, the original author of\n WWW::Mechanize::Cached passed away. I've taken over maintenance\n of the module. If you're interested in carrying on Iain's work,\n let me know.\n\n\n",
"raw" => " On December 29th, 2003, Iain Truskett, the original author of\n",
"style" => "",
"text" => "On December 29th, 2003, Iain Truskett, the original author of"
},
{
"line" => 110,
"raw" => " WWW::Mechanize::Cached passed away. I've taken over maintenance\n",
"style" => "",
"text" => "WWW::Mechanize::Cached passed away. I've taken over maintenance"
},
{
"line" => 111,
"raw" => " of the module. If you're interested in carrying on Iain's work,\n",
"style" => "",
"text" => "of the module. If you're interested in carrying on Iain's work,"
},
{
"line" => 112,
"raw" => " let me know.\n\n\n",
"style" => "",
"text" => "On December 29th, 2003, Iain Truskett, the original author of WWW::Mechanize::Cached passed away. I've taken over maintenance of the module. If you're interested in carrying on Iain's work, let me know."
"text" => "let me know."
}
],
"line" => 105,
Expand Down
96 changes: 84 additions & 12 deletions corpus/dists/Wiktionary-Parser.parsed
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,27 @@
"entries" => [
{
"line" => 7,
"raw" => " accessors for translations, synonyms, hyponyms, hypernyms, antonyms, pronunciations, word senses, parts of speech\n stubbed out accessors for etymologies, derived words, alternative forms\n added methods for accessing and traversing document sections\n utilize MediaWiki::API package\n\n\n",
"raw" => " accessors for translations, synonyms, hyponyms, hypernyms, antonyms, pronunciations, word senses, parts of speech\n",
"style" => "",
"text" => "accessors for translations, synonyms, hyponyms, hypernyms, antonyms, pronunciations, word senses, parts of speech stubbed out accessors for etymologies, derived words, alternative forms added methods for accessing and traversing document sections utilize MediaWiki::API package"
"text" => "accessors for translations, synonyms, hyponyms, hypernyms, antonyms, pronunciations, word senses, parts of speech"
},
{
"line" => 8,
"raw" => " stubbed out accessors for etymologies, derived words, alternative forms\n",
"style" => "",
"text" => "stubbed out accessors for etymologies, derived words, alternative forms"
},
{
"line" => 9,
"raw" => " added methods for accessing and traversing document sections\n",
"style" => "",
"text" => "added methods for accessing and traversing document sections"
},
{
"line" => 10,
"raw" => " utilize MediaWiki::API package\n\n\n",
"style" => "",
"text" => "utilize MediaWiki::API package"
}
],
"line" => 6,
Expand All @@ -37,9 +55,27 @@
"entries" => [
{
"line" => 14,
"raw" => " Added subdocuments to provide more functionality when retrieving child sections of the document.\n Follow Wikisaurus links for synonyms, hyponyms, hypernyms, etc and include content from those pages.\n Provided method for downloading audio files for pronunciations\n Normalize language codes and provide consistent language names\n\n\n",
"raw" => " Added subdocuments to provide more functionality when retrieving child sections of the document.\n",
"style" => "",
"text" => "Added subdocuments to provide more functionality when retrieving child sections of the document."
},
{
"line" => 15,
"raw" => " Follow Wikisaurus links for synonyms, hyponyms, hypernyms, etc and include content from those pages.\n",
"style" => "",
"text" => "Follow Wikisaurus links for synonyms, hyponyms, hypernyms, etc and include content from those pages."
},
{
"line" => 16,
"raw" => " Provided method for downloading audio files for pronunciations\n",
"style" => "",
"text" => "Provided method for downloading audio files for pronunciations"
},
{
"line" => 17,
"raw" => " Normalize language codes and provide consistent language names\n\n\n",
"style" => "",
"text" => "Added subdocuments to provide more functionality when retrieving child sections of the document. Follow Wikisaurus links for synonyms, hyponyms, hypernyms, etc and include content from those pages. Provided method for downloading audio files for pronunciations Normalize language codes and provide consistent language names"
"text" => "Normalize language codes and provide consistent language names"
}
],
"line" => 13,
Expand All @@ -52,9 +88,21 @@
"entries" => [
{
"line" => 21,
"raw" => " Added unit test for parsing a document\n Added unit test for parsing translations\n Refactored translation parser\n\n\n",
"raw" => " Added unit test for parsing a document\n",
"style" => "",
"text" => "Added unit test for parsing a document Added unit test for parsing translations Refactored translation parser"
"text" => "Added unit test for parsing a document"
},
{
"line" => 22,
"raw" => " Added unit test for parsing translations\n",
"style" => "",
"text" => "Added unit test for parsing translations"
},
{
"line" => 23,
"raw" => " Refactored translation parser\n\n\n",
"style" => "",
"text" => "Refactored translation parser"
}
],
"line" => 20,
Expand All @@ -67,9 +115,21 @@
"entries" => [
{
"line" => 27,
"raw" => " updated documentation\n Added example scripts in /bin \n Various bugfixes\n\n\n",
"raw" => " updated documentation\n",
"style" => "",
"text" => "updated documentation"
},
{
"line" => 28,
"raw" => " Added example scripts in /bin \n",
"style" => "",
"text" => "updated documentation Added example scripts in /bin Various bugfixes"
"text" => "Added example scripts in /bin"
},
{
"line" => 29,
"raw" => " Various bugfixes\n\n\n",
"style" => "",
"text" => "Various bugfixes"
}
],
"line" => 26,
Expand All @@ -82,9 +142,15 @@
"entries" => [
{
"line" => 33,
"raw" => " Added part of speech info to output of get_translations()\n Included translations from other wiktionary pages linked to the original one\n\t \n\n",
"raw" => " Added part of speech info to output of get_translations()\n",
"style" => "",
"text" => "Added part of speech info to output of get_translations()"
},
{
"line" => 34,
"raw" => " Included translations from other wiktionary pages linked to the original one\n\t \n\n",
"style" => "",
"text" => "Added part of speech info to output of get_translations() Included translations from other wiktionary pages linked to the original one"
"text" => "Included translations from other wiktionary pages linked to the original one"
}
],
"line" => 32,
Expand Down Expand Up @@ -112,9 +178,15 @@
"entries" => [
{
"line" => 41,
"raw" => " Various bugfixes for data sanitizing\n Fixed issue with unit tests\n",
"raw" => " Various bugfixes for data sanitizing\n",
"style" => "",
"text" => "Various bugfixes for data sanitizing"
},
{
"line" => 42,
"raw" => " Fixed issue with unit tests\n",
"style" => "",
"text" => "Various bugfixes for data sanitizing Fixed issue with unit tests"
"text" => "Fixed issue with unit tests"
}
],
"line" => 40,
Expand Down
10 changes: 8 additions & 2 deletions corpus/dists/if.parsed
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,15 @@
"entries" => [
{
"line" => 15,
"raw" => "\t\t Better error handling.\n\t\t Suggest significance of => in the docs.\n\n",
"raw" => "\t\t Better error handling.\n",
"style" => "",
"text" => "Better error handling. Suggest significance of => in the docs."
"text" => "Better error handling."
},
{
"line" => 16,
"raw" => "\t\t Suggest significance of => in the docs.\n\n",
"style" => "",
"text" => "Suggest significance of => in the docs."
}
],
"line" => 14,
Expand Down
13 changes: 11 additions & 2 deletions lib/CPAN/Changes/Parser.pm
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,18 @@ sub _parse {
else {
$change = $line;
if (
$indent >= $#indents
&& defined $indents[-1]{text}
defined $indents[-1]{text}
&& !$indents[-1]{done}
&& (
$indent > $#indents
|| (
$indent == $#indents
&& (
length $indents[-1]{style}
|| $indent == 1
)
)
)
) {
$indents[-1]{raw} .= $full_line;
$indents[-1]{text} .= " $change";
Expand Down

0 comments on commit 05eae04

Please sign in to comment.