You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@lucene.apache.org by us...@apache.org on 2009/11/17 10:40:52 UTC
svn commit: r881213 - in /lucene/java/trunk: CHANGES.txt
src/site/changes/ChangesFancyStyle.css
src/site/changes/ChangesFixedWidthStyle.css
src/site/changes/ChangesSimpleStyle.css src/site/changes/changes2html.pl
Author: uschindler
Date: Tue Nov 17 09:40:51 2009
New Revision: 881213
URL: http://svn.apache.org/viewvc?rev=881213&view=rev
Log:
LUCENE-2077: changes-to-html: better handling of bulleted lists in CHANGES.txt
Modified:
lucene/java/trunk/CHANGES.txt
lucene/java/trunk/src/site/changes/ChangesFancyStyle.css
lucene/java/trunk/src/site/changes/ChangesFixedWidthStyle.css
lucene/java/trunk/src/site/changes/ChangesSimpleStyle.css
lucene/java/trunk/src/site/changes/changes2html.pl
Modified: lucene/java/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/CHANGES.txt?rev=881213&r1=881212&r2=881213&view=diff
==============================================================================
--- lucene/java/trunk/CHANGES.txt (original)
+++ lucene/java/trunk/CHANGES.txt Tue Nov 17 09:40:51 2009
@@ -76,7 +76,7 @@
(Uwe Schindler, Robert Muir, Karl Wettin, Paul Elschot, Kay Kay, Shai Erera)
* Generify Lucene API:
- <code>
+
- TokenStream/AttributeSource: Now addAttribute()/getAttribute() return an
instance of the requested attribute interface and no cast needed anymore.
- NumericRangeQuery, NumericRangeFilter, and FieldCacheRangeFilter
@@ -91,14 +91,13 @@
- 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 @@
- 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 members
Modified: lucene/java/trunk/src/site/changes/ChangesFancyStyle.css
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/site/changes/ChangesFancyStyle.css?rev=881213&r1=881212&r2=881213&view=diff
==============================================================================
--- lucene/java/trunk/src/site/changes/ChangesFancyStyle.css (original)
+++ lucene/java/trunk/src/site/changes/ChangesFancyStyle.css Tue Nov 17 09:40:51 2009
@@ -24,6 +24,11 @@
color: purple;
}
+li.bulleted-list {
+ margin-top: 0.25em;
+ margin-bottom: 0.25em;
+}
+
li {
margin-top: 1em;
margin-bottom: 1em;
Modified: lucene/java/trunk/src/site/changes/ChangesFixedWidthStyle.css
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/site/changes/ChangesFixedWidthStyle.css?rev=881213&r1=881212&r2=881213&view=diff
==============================================================================
--- lucene/java/trunk/src/site/changes/ChangesFixedWidthStyle.css (original)
+++ lucene/java/trunk/src/site/changes/ChangesFixedWidthStyle.css Tue Nov 17 09:40:51 2009
@@ -26,6 +26,11 @@
color: purple;
}
+li.bulleted-list {
+ margin-top: 0.25em;
+ margin-bottom: 0.25em;
+}
+
li {
margin-top: 1em;
margin-bottom: 1em;
Modified: lucene/java/trunk/src/site/changes/ChangesSimpleStyle.css
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/site/changes/ChangesSimpleStyle.css?rev=881213&r1=881212&r2=881213&view=diff
==============================================================================
--- lucene/java/trunk/src/site/changes/ChangesSimpleStyle.css (original)
+++ lucene/java/trunk/src/site/changes/ChangesSimpleStyle.css Tue Nov 17 09:40:51 2009
@@ -1,3 +1,8 @@
+li.bulleted-list {
+ margin-top: 0.25em;
+ margin-bottom: 0.25em;
+}
+
li {
margin-top: 1em;
margin-bottom: 1em;
Modified: lucene/java/trunk/src/site/changes/changes2html.pl
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/site/changes/changes2html.pl?rev=881213&r1=881212&r2=881213&view=diff
==============================================================================
--- lucene/java/trunk/src/site/changes/changes2html.pl (original)
+++ lucene/java/trunk/src/site/changes/changes2html.pl Tue Nov 17 09:40:51 2009
@@ -219,8 +219,12 @@
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 @@
*/
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 @@
# 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 @@
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+)}