mirror of https://github.com/apache/lucene.git
SOLR-14024 Invalid html generated by changes2html.pl (#31)
This commit is contained in:
parent
246c4beb22
commit
2678d68be8
|
@ -254,7 +254,8 @@ print<<"__HTML_HEADER__";
|
|||
* limitations under the License.
|
||||
****************************************************************************
|
||||
-->
|
||||
<html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>$title</title>
|
||||
<link rel="stylesheet" href="ChangesFancyStyle.css" title="Fancy">
|
||||
|
@ -290,6 +291,8 @@ print<<"__HTML_HEADER__";
|
|||
var orderedLists = document.getElementsByTagName("ol");
|
||||
for (var i = 0; i < orderedLists.length; i++)
|
||||
orderedLists[i].style.display = "none";
|
||||
var olderList = document.getElementById("older.list");
|
||||
olderList.style.display = "none";
|
||||
var anchors = document.getElementsByTagName("a");
|
||||
for (var i = 0 ; i < anchors.length; i++) {
|
||||
if (anchors[i].id != '')
|
||||
|
@ -308,6 +311,8 @@ print<<"__HTML_HEADER__";
|
|||
var orderedLists = document.getElementsByTagName("ol");
|
||||
for (var i = 0; i < orderedLists.length; i++)
|
||||
orderedLists[i].style.display = "block";
|
||||
var olderList = document.getElementById("older.list");
|
||||
olderList.style.display = "block";
|
||||
var anchors = document.getElementsByTagName("a");
|
||||
for (var i = 0 ; i < anchors.length; i++) {
|
||||
if (anchors[i].id != '')
|
||||
|
@ -368,6 +373,8 @@ print<<"__HTML_HEADER__";
|
|||
list.style.display = "none";
|
||||
}
|
||||
}
|
||||
var olderList = document.getElementById("older.list");
|
||||
olderList.style.display = "none";
|
||||
/* Add "Click to collapse/expand" tooltips to the release/section headings */
|
||||
var anchors = document.getElementsByTagName("a");
|
||||
for (var i = 0 ; i < anchors.length; i++) {
|
||||
|
@ -418,7 +425,7 @@ for my $rel (@releases) {
|
|||
print "<h2><a id=\"older\" href=\"javascript:toggleList('older')\">";
|
||||
print "Older Releases";
|
||||
print "</a></h2>\n";
|
||||
print "<ul id=\"older.list\">\n"
|
||||
print "<div id=\"older.list\">\n"
|
||||
}
|
||||
|
||||
($release, $reldate, $relinfo, $sections) = @$rel;
|
||||
|
@ -442,6 +449,7 @@ for my $rel (@releases) {
|
|||
if ($has_release_sections);
|
||||
}
|
||||
|
||||
my $licnt = 0;
|
||||
for my $section (@$sections) {
|
||||
($heading, $items) = @$section;
|
||||
(my $sectid = lc($heading)) =~ s/\s+/_/g;
|
||||
|
@ -451,12 +459,13 @@ for my $rel (@releases) {
|
|||
if ($release) {
|
||||
if ($heading) {
|
||||
if ($heading eq 'Detailed Change List') {
|
||||
print " <$subheader>$heading</$subheader>\n";
|
||||
print " <li style='list-style-type:none;'><$subheader>$heading</$subheader></li>\n";
|
||||
next;
|
||||
} elsif ($has_release_sections) {
|
||||
print " <li><a id=\"$relid.$sectid\"",
|
||||
" href=\"javascript:toggleList('$relid.$sectid')\">$heading</a>",
|
||||
" $numItemsStr\n"
|
||||
" $numItemsStr\n";
|
||||
++$licnt;
|
||||
}
|
||||
}
|
||||
} else { # $release is not defined
|
||||
|
@ -480,7 +489,7 @@ for my $rel (@releases) {
|
|||
my $prefix = $1;
|
||||
my $code = $2;
|
||||
$code =~ s/\s+$//;
|
||||
"$prefix<code><pre>$code</pre></code>"
|
||||
"$prefix<pre><code>$code></code></pre>"
|
||||
}gise;
|
||||
|
||||
$item = markup_trailing_attribution($item) unless ($item =~ /\n[ ]*-/);
|
||||
|
@ -551,7 +560,9 @@ for my $rel (@releases) {
|
|||
}
|
||||
}sge;
|
||||
|
||||
$item =~ s:\n{2,}:\n<p/>\n:g; # Keep paragraph breaks
|
||||
$item =~ s:\n{2,}:\n<p>\n:g; # Keep paragraph breaks
|
||||
$item =~ s:</li>\n<p>\n<li:</li>\n<li\n:g;
|
||||
$item =~ s:</li>\n<p>\n(.*)\n:</li></ul><p>\n$1\n<ul>:g;
|
||||
# Link LUCENE-XXX, SOLR-XXX and INFRA-XXX to JIRA
|
||||
$item =~ s{(?:${jira_url_prefix})?((?:LUCENE|SOLR|INFRA)-\d+)}
|
||||
{<a href="${jira_url_prefix}$1">$1</a>}g;
|
||||
|
@ -600,18 +611,22 @@ for my $rel (@releases) {
|
|||
}
|
||||
|
||||
# Linkify URLs, except Bugzilla links, which don't work anymore
|
||||
$item =~ s~(?<![">])(https?://(?!(?:nagoya|issues)\.apache\.org/bugzilla)[^\s\)]+)~<a href="$1">$1</a>~g;
|
||||
# also ignore localhost, ..., $SOLR_PORT, 127.0.0.1
|
||||
$item =~ s~(?<![">])(https?://(?!(?:nagoya|issues)\.apache\.org/bugzilla|localhost|\.\.\.|\$SOLR_HOST|127\.0\.0\.1)[^\s\)]+)~<a href="$1">$1</a>~g;
|
||||
|
||||
$item =~ s~</ul>\s+<p/>\s+<br\s*/>~</ul>~;
|
||||
$item =~ s~</ul>\s+<p>\s+<br\s*/>~</ul>~;
|
||||
|
||||
print " <$list_item>$item</$list_item>\n";
|
||||
}
|
||||
print " </$list>\n" unless (not $release or ($has_release_sections and not $heading));
|
||||
print " </li>\n" if ($release and $has_release_sections);
|
||||
if ($release and $has_release_sections and $licnt>0) {
|
||||
print " </li>\n";
|
||||
--$licnt;
|
||||
}
|
||||
}
|
||||
print "</ul>\n" if ($release and $has_release_sections);
|
||||
}
|
||||
print "</ul>\n" if ($relcnt > 3);
|
||||
print "</div>\n" if ($relcnt > 3);
|
||||
print "</body>\n</html>\n";
|
||||
|
||||
|
||||
|
@ -708,7 +723,6 @@ sub markup_trailing_attribution {
|
|||
sub has_release_sections {
|
||||
my $sections = shift;
|
||||
my $has_release_sections = 0;
|
||||
my $first_titled_section_num = -1;
|
||||
for my $section_num (0 .. $#{$sections}) {
|
||||
if ($sections->[$section_num][0]) {
|
||||
$has_release_sections = 1;
|
||||
|
|
|
@ -1347,8 +1347,6 @@ Other
|
|||
* LUCENE-8886: Fix TestMutablePointsReaderUtils tests. (Ignacio Vera)
|
||||
|
||||
======================= Lucene 8.1.1 =======================
|
||||
(No Changes)
|
||||
|
||||
Improvements
|
||||
|
||||
* LUCENE-8781: FST lookup performance has been improved in many cases by
|
||||
|
@ -10303,7 +10301,7 @@ Changes in backwards compatibility policy
|
|||
To prevent this slowdown, use oal.index.IndexUpgrader
|
||||
to upgrade your indexes to latest file format (LUCENE-3082).
|
||||
|
||||
Mixed flex/pre-flex indexes are perfectly fine -- the two
|
||||
- Mixed flex/pre-flex indexes are perfectly fine -- the two
|
||||
emulation layers (flex API on pre-flex index, and pre-flex API on
|
||||
flex index) will remap the access as required. So on upgrading to
|
||||
4.0 you can start indexing new documents into an existing index.
|
||||
|
|
Loading…
Reference in New Issue