mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
merge with 0.6
This commit is contained in:
commit
9fca66a690
10
CHANGES
10
CHANGES
@ -154,6 +154,16 @@ Features added
|
||||
- Added Danish translation, thanks to Hjorth Larsen.
|
||||
|
||||
|
||||
Release 0.6.8 (in development)
|
||||
==============================
|
||||
|
||||
* #445: Fix links to result pages when using the search function
|
||||
of HTML built with the ``dirhtml`` builder.
|
||||
|
||||
* #444: In templates, properly re-escape values treated with the
|
||||
"striptags" Jinja filter.
|
||||
|
||||
|
||||
Release 0.6.7 (Jun 05, 2010)
|
||||
============================
|
||||
|
||||
|
@ -800,6 +800,10 @@ class DirectoryHTMLBuilder(StandaloneHTMLBuilder):
|
||||
|
||||
return outfilename
|
||||
|
||||
def prepare_writing(self, docnames):
|
||||
StandaloneHTMLBuilder.prepare_writing(self, docnames)
|
||||
self.globalcontext['no_search_suffix'] = True
|
||||
|
||||
|
||||
class SingleFileHTMLBuilder(StandaloneHTMLBuilder):
|
||||
"""
|
||||
|
@ -23,7 +23,7 @@
|
||||
{%- endblock %}
|
||||
<div class="rel">
|
||||
{%- for rellink in rellinks %}
|
||||
<a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags }}"
|
||||
<a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags|e }}"
|
||||
{{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
|
||||
{%- if not loop.last %}{{ reldelim2 }}{% endif %}
|
||||
{%- endfor %}
|
||||
@ -68,7 +68,7 @@
|
||||
<div class="footer">
|
||||
<div class="left">
|
||||
{%- for rellink in rellinks %}
|
||||
<a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags }}"
|
||||
<a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags|e }}"
|
||||
{{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
|
||||
{%- if not loop.last %}{{ reldelim2 }}{% endif %}
|
||||
{%- endfor %}
|
||||
|
@ -24,7 +24,7 @@
|
||||
<ul>
|
||||
{%- for rellink in rellinks %}
|
||||
<li class="right" {% if loop.first %}style="margin-right: 10px"{% endif %}>
|
||||
<a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags }}"
|
||||
<a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags|e }}"
|
||||
{{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
|
||||
{%- if not loop.first %}{{ reldelim2 }}{% endif %}</li>
|
||||
{%- endfor %}
|
||||
@ -88,7 +88,7 @@
|
||||
{%- set titlesuffix = "" %}
|
||||
{%- endif %}
|
||||
{%- block htmltitle %}
|
||||
<title>{{ title|striptags }}{{ titlesuffix }}</title>
|
||||
<title>{{ title|striptags|e }}{{ titlesuffix }}</title>
|
||||
{%- endblock %}
|
||||
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
|
||||
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
|
||||
@ -101,7 +101,7 @@
|
||||
URL_ROOT: '{{ url_root }}',
|
||||
VERSION: '{{ release|e }}',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '{{ file_suffix }}',
|
||||
FILE_SUFFIX: '{{ '' if no_search_suffix else file_suffix }}',
|
||||
HAS_SOURCE: {{ has_source|lower }}
|
||||
};
|
||||
</script>
|
||||
@ -132,13 +132,13 @@
|
||||
{%- endif %}
|
||||
<link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}" />
|
||||
{%- if parents %}
|
||||
<link rel="up" title="{{ parents[-1].title|striptags }}" href="{{ parents[-1].link|e }}" />
|
||||
<link rel="up" title="{{ parents[-1].title|striptags|e }}" href="{{ parents[-1].link|e }}" />
|
||||
{%- endif %}
|
||||
{%- if next %}
|
||||
<link rel="next" title="{{ next.title|striptags }}" href="{{ next.link|e }}" />
|
||||
<link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" />
|
||||
{%- endif %}
|
||||
{%- if prev %}
|
||||
<link rel="prev" title="{{ prev.title|striptags }}" href="{{ prev.link|e }}" />
|
||||
<link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" />
|
||||
{%- endif %}
|
||||
{%- endblock %}
|
||||
{%- block extrahead %} {% endblock %}
|
||||
|
@ -456,10 +456,23 @@ var Search = {
|
||||
if (results.length) {
|
||||
var item = results.pop();
|
||||
var listItem = $('<li style="display:none"></li>');
|
||||
listItem.append($('<a/>').attr(
|
||||
'href',
|
||||
item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
|
||||
highlightstring + item[2]).html(item[1]));
|
||||
if (DOCUMENTATION_OPTIONS.FILE_SUFFIX == '') {
|
||||
// dirhtml builder
|
||||
var dirname = item[0] + '/';
|
||||
if (dirname.match(/\/index\/$/)) {
|
||||
dirname = dirname.substring(0, dirname.length-6);
|
||||
} else if (dirname == 'index/') {
|
||||
dirname = '';
|
||||
}
|
||||
listItem.append($('<a/>').attr('href',
|
||||
DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
|
||||
highlightstring + item[2]).html(item[1]));
|
||||
} else {
|
||||
// normal html builders
|
||||
listItem.append($('<a/>').attr('href',
|
||||
item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
|
||||
highlightstring + item[2]).html(item[1]));
|
||||
}
|
||||
if (item[3]) {
|
||||
listItem.append($('<span> (' + item[3] + ')</span>'));
|
||||
Search.output.append(listItem);
|
||||
@ -472,10 +485,10 @@ var Search = {
|
||||
if (data != '') {
|
||||
listItem.append($.makeSearchSummary(data, searchterms, hlterms));
|
||||
Search.output.append(listItem);
|
||||
listItem.slideDown(5, function() {
|
||||
displayNextItem();
|
||||
});
|
||||
}
|
||||
listItem.slideDown(5, function() {
|
||||
displayNextItem();
|
||||
});
|
||||
});
|
||||
} else {
|
||||
// no source available, just display title
|
||||
|
@ -46,7 +46,7 @@
|
||||
{%- endif -%}
|
||||
<h1 class="heading"><a href="{{ pathto('index') }}">
|
||||
<span>{{ shorttitle|e }}</span></a></h1>
|
||||
<h2 class="heading"><span>{{ title|striptags }}</span></h2>
|
||||
<h2 class="heading"><span>{{ title|striptags|e }}</span></h2>
|
||||
{%- endif %}
|
||||
{%- endblock %}
|
||||
</div>
|
||||
@ -65,4 +65,4 @@
|
||||
<div class="bottomnav">
|
||||
{{ nav() }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
@ -18,7 +18,7 @@
|
||||
<div id="content">
|
||||
<div class="header">
|
||||
<h1 class="heading"><a href="{{ pathto('index') }}"
|
||||
title="back to the documentation overview"><span>{{ title|striptags }}</span></a></h1>
|
||||
title="back to the documentation overview"><span>{{ title|striptags|e }}</span></a></h1>
|
||||
</div>
|
||||
<div class="relnav">
|
||||
{%- if prev %}
|
||||
@ -39,4 +39,4 @@
|
||||
{% block body %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user