[Python-checkins] r64795 - in doctools/branches/0.4.x: CHANGES sphinx/builder.py sphinx/static/searchtools.js sphinx/templates/layout.html
georg.brandl
python-checkins at python.org
Tue Jul 8 16:48:59 CEST 2008
Author: georg.brandl
Date: Tue Jul 8 16:48:58 2008
New Revision: 64795
Log:
Use correct filename extension in search.
Modified:
doctools/branches/0.4.x/CHANGES
doctools/branches/0.4.x/sphinx/builder.py
doctools/branches/0.4.x/sphinx/static/searchtools.js
doctools/branches/0.4.x/sphinx/templates/layout.html
Modified: doctools/branches/0.4.x/CHANGES
==============================================================================
--- doctools/branches/0.4.x/CHANGES (original)
+++ doctools/branches/0.4.x/CHANGES Tue Jul 8 16:48:58 2008
@@ -1,3 +1,10 @@
+Release 0.4.2 (in development)
+==============================
+
+* The JavaScript search now uses the correct file name suffix when
+ referring to found items.
+
+
Release 0.4.1 (Jul 5, 2008)
===========================
Modified: doctools/branches/0.4.x/sphinx/builder.py
==============================================================================
--- doctools/branches/0.4.x/sphinx/builder.py (original)
+++ doctools/branches/0.4.x/sphinx/builder.py Tue Jul 8 16:48:58 2008
@@ -377,6 +377,7 @@
docstitle = self.config.html_title,
shorttitle = self.config.html_short_title,
show_sphinx = self.config.html_show_sphinx,
+ file_suffix = self.config.html_file_suffix,
rellinks = rellinks,
builder = self.name,
parents = [],
Modified: doctools/branches/0.4.x/sphinx/static/searchtools.js
==============================================================================
--- doctools/branches/0.4.x/sphinx/static/searchtools.js (original)
+++ doctools/branches/0.4.x/sphinx/static/searchtools.js Tue Jul 8 16:48:58 2008
@@ -363,8 +363,10 @@
if (results.length) {
var item = results.pop();
var listItem = $('<li style="display:none"></li>');
- listItem.append($('<a/>').attr('href', item[0] + '.html' +
- highlightstring).html(item[1]));
+ listItem.append($('<a/>').attr(
+ 'href',
+ item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
+ highlightstring).html(item[1]));
$.get('_sources/' + item[0] + '.txt', function(data) {
listItem.append($.makeSearchSummary(data, searchwords, hlwords));
output.append(listItem);
Modified: doctools/branches/0.4.x/sphinx/templates/layout.html
==============================================================================
--- doctools/branches/0.4.x/sphinx/templates/layout.html (original)
+++ doctools/branches/0.4.x/sphinx/templates/layout.html Tue Jul 8 16:48:58 2008
@@ -102,9 +102,10 @@
{%- if builder != 'htmlhelp' %}
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
- URL_ROOT: '{{ pathto("", 1) }}',
- VERSION: '{{ release }}',
- COLLAPSE_MODINDEX: false
+ URL_ROOT: '{{ pathto("", 1) }}',
+ VERSION: '{{ release }}',
+ COLLAPSE_MODINDEX: false,
+ FILE_SUFFIX: '{{ file_suffix }}'
};
</script>
<script type="text/javascript" src="{{ pathto('_static/jquery.js', 1) }}"></script>
More information about the Python-checkins
mailing list