Apache Solr open-source search software
LUCENE-2077: changes-to-html: better handling of bulleted lists in CHANGES.txt
Uwe Schindler9606a8e131bb
diff --git a/CHANGES.txt b/CHANGES.txtindex 32864b7ac4f..c9ac1d04eb8 100644--- a/CHANGES.txt+++ b/CHANGES.txt@@ -76,7 +76,7 @@ API Changes(Uwe Schindler, Robert Muir, Karl Wettin, Paul Elschot, Kay Kay, Shai Erera)* Generify Lucene API:- <code>+- TokenStream/AttributeSource: Now addAttribute()/getAttribute() return aninstance of the requested attribute interface and no cast needed anymore.- NumericRangeQuery, NumericRangeFilter, and FieldCacheRangeFilter@@ -91,14 +91,13 @@ API Changes- MapOfSets- o.a.l.util.cache package- lot's of internal APIs of IndexWriter- </code>(Uwe Schindler, Michael Busch, Kay Kay, Robert Muir, Adriano Crestani)* LUCENE-1944, LUCENE-1856, LUCENE-1957, LUCENE-1960, LUCENE-1961,LUCENE-1968, LUCENE-1970, LUCENE-1946, LUCENE-1971, LUCENE-1975,LUCENE-1972, LUCENE-1978, LUCENE-944, LUCENE-1979, LUCENE-1973, LUCENE-2011:Remove deprecated methods/constructors/classes:- <code>+- All String/File directory paths in IndexReader /IndexSearcher / IndexWriter.- Remove FSDirectory.getDirectory()@@ -123,7 +122,6 @@ API Changes- Remove BoostingTermQuery.- Remove MultiValueSource.- Remove Scorer.explain(int).- </code>...and some other minor ones (Uwe Schindler, Michael Busch, Mark Miller)* LUCENE-1925: Make IndexSearcher's subReaders and docStarts membersdiff --git a/src/site/changes/ChangesFancyStyle.css b/src/site/changes/ChangesFancyStyle.cssindex 17734814a0e..9c99f591f02 100755--- a/src/site/changes/ChangesFancyStyle.css+++ b/src/site/changes/ChangesFancyStyle.css@@ -24,6 +24,11 @@ a:visited {color: purple;}+li.bulleted-list {+ margin-top: 0.25em;+ margin-bottom: 0.25em;+}+li {margin-top: 1em;margin-bottom: 1em;diff --git a/src/site/changes/ChangesFixedWidthStyle.css b/src/site/changes/ChangesFixedWidthStyle.cssindex 36fc31b9c1b..844bb90d20c 100755--- a/src/site/changes/ChangesFixedWidthStyle.css+++ b/src/site/changes/ChangesFixedWidthStyle.css@@ -26,6 +26,11 @@ a:visited {color: purple;}+li.bulleted-list {+ margin-top: 0.25em;+ margin-bottom: 0.25em;+}+li {margin-top: 1em;margin-bottom: 1em;diff --git a/src/site/changes/ChangesSimpleStyle.css b/src/site/changes/ChangesSimpleStyle.cssindex 826254e3a20..f3650c59ef2 100755--- a/src/site/changes/ChangesSimpleStyle.css+++ b/src/site/changes/ChangesSimpleStyle.css@@ -1,3 +1,8 @@+li.bulleted-list {+ margin-top: 0.25em;+ margin-bottom: 0.25em;+}+li {margin-top: 1em;margin-bottom: 1em;diff --git a/src/site/changes/changes2html.pl b/src/site/changes/changes2html.plindex 4078970eabb..17183503ea9 100755--- a/src/site/changes/changes2html.pl+++ b/src/site/changes/changes2html.pl@@ -219,8 +219,12 @@ print<<"__HTML_HEADER__";function collapseAll() {var unorderedLists = document.getElementsByTagName("ul");- for (var i = 0; i < unorderedLists.length; i++)- unorderedLists[i].style.display = "none";+ for (var i = 0; i < unorderedLists.length; i++) {+ if (unorderedLists[i].className != 'bulleted-list')+ unorderedLists[i].style.display = "none";+ else+ unorderedLists[i].style.display = "block";+ }var orderedLists = document.getElementsByTagName("ol");for (var i = 0; i < orderedLists.length; i++)orderedLists[i].style.display = "none";@@ -285,6 +289,7 @@ print<<"__HTML_HEADER__";*/if (list.id != '$first_relid.list'&& list.id != '$second_relid.list'+ && list.className != 'bulleted-list'&& (currentAnchor == ''|| ! shouldExpand(currentList, currentAnchor, list.id))) {list.style.display = "none";@@ -392,7 +397,7 @@ for my $rel (@releases) {# Put attributions on their own lines.# Check for trailing parenthesized attribution with no following period.# Exclude things like "(see #3 above)" and "(use the bug number instead of xxxx)"- unless ($item =~ s:\s*(\((?!see #|use the bug number)[^)"]+?\))\s*$:<br /><span class="attrib">$1</span>:) {+ unless ($item =~ s:\s*(\((?!see #|use the bug number)[^)"]+?\))\s*$:\n<br /><span class="attrib">$1</span>:) {# If attribution is not found, then look for attribution with a# trailing period, but try not to include trailing parenthesized things# that are not attributions.@@ -412,12 +417,45 @@ for my $rel (@releases) {my ($no_parens) = $parenthetical =~ /^\((.*)\)$/s;my @words = grep {/\S/} split /\s+/, $no_parens;if ($no_parens =~ /\b(?:via|updates\s+from)\b/i || scalar(@words) <= 3) {- $subst = "<br /><span class=\"attrib\">$parenthetical</span>";+ $subst = "\n<br /><span class=\"attrib\">$parenthetical</span>";}}$subst . $trailing_period_and_or_issue;}ex;}++ $item =~ s{(.*?)(<code><pre>.*?</pre></code>)|(.*)}+ {+ my $uncode = undef;+ if (defined($2)) {+ $uncode = $1 || '';+ $uncode =~ s{((?<=\n)[ ]*-.*\n(?:.*\n)*)}+ {+ my $bulleted_list = $1;+ $bulleted_list+ =~ s{(?:(?<=\n)|\A)[ ]*-[ ]*(.*(?:\n|\z)(?:[ ]+[^ -].*(?:\n|\z))*)}+ {<li class="bulleted-list">\n$1</li>\n}g;+ $bulleted_list+ =~ s!(<li.*</li>\n)!<ul class="bulleted-list">\n$1</ul>\n!s;+ $bulleted_list;+ }ge;+ "$uncode$2";+ } else {+ $uncode = $3 || '';+ $uncode =~ s{((?<=\n)[ ]*-.*\n(?:.*\n)*)}+ {+ my $bulleted_list = $1;+ $bulleted_list+ =~ s{(?:(?<=\n)|\A)[ ]*-[ ]*(.*(?:\n|\z)(?:[ ]+[^ -].*(?:\n|\z))*)}+ {<li class="bulleted-list">\n$1</li>\n}g;+ $bulleted_list+ =~ s!(<li.*</li>\n)!<ul class="bulleted-list">\n$1</ul>\n!s;+ $bulleted_list;+ }ge;+ $uncode;+ }+ }sge;+$item =~ s:\n{2,}:\n<p/>\n:g; # Keep paragraph breaks# Link LUCENE-XXX, SOLR-XXX and INFRA-XXX to JIRA$item =~ s{(?:${jira_url_prefix})?((?:LUCENE|SOLR|INFRA)-\d+)}