LUCENE-2077: changes-to-html: better handling of bulleted lists in CHANGES.txt

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@881213 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2009-11-17 09:40:51 +00:00
parent db8e03e7e9
commit 9606a8e131
5 changed files with 59 additions and 8 deletions

View File

@ -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 an
instance 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 members

View File

@ -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;

View File

@ -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;

View File

@ -1,3 +1,8 @@
li.bulleted-list {
margin-top: 0.25em;
margin-bottom: 0.25em;
}
li {
margin-top: 1em;
margin-bottom: 1em;

View File

@ -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+)}