Skip to content

Change "headline" to "heading" #10048

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sphinx/themes/basic/static/doctools.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ var Documentation = {
$('div[id] > :header:first').each(function() {
$('<a class="headerlink">\u00B6</a>').
attr('href', '#' + this.id).
attr('title', _('Permalink to this headline')).
attr('title', _('Permalink to this heading')).
appendTo(this);
});
$('dt[id]').each(function() {
Expand Down
4 changes: 2 additions & 2 deletions sphinx/writers/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,12 +434,12 @@ def depart_title(self, node: Element) -> None:
node.parent.hasattr('ids') and node.parent['ids']):
# add permalink anchor
if close_tag.startswith('</h'):
self.add_permalink_ref(node.parent, _('Permalink to this headline'))
self.add_permalink_ref(node.parent, _('Permalink to this heading'))
elif close_tag.startswith('</a></h'):
self.body.append('</a><a class="headerlink" href="#%s" ' %
node.parent['ids'][0] +
'title="%s">%s' % (
_('Permalink to this headline'),
_('Permalink to this heading'),
self.config.html_permalinks_icon))
elif isinstance(node.parent, nodes.table):
self.body.append('</span>')
Expand Down
4 changes: 2 additions & 2 deletions sphinx/writers/html5.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,12 +389,12 @@ def depart_title(self, node: Element) -> None:
node.parent.hasattr('ids') and node.parent['ids']):
# add permalink anchor
if close_tag.startswith('</h'):
self.add_permalink_ref(node.parent, _('Permalink to this headline'))
self.add_permalink_ref(node.parent, _('Permalink to this heading'))
elif close_tag.startswith('</a></h'):
self.body.append('</a><a class="headerlink" href="#%s" ' %
node.parent['ids'][0] +
'title="%s">%s' % (
_('Permalink to this headline'),
_('Permalink to this heading'),
self.config.html_permalinks_icon))
elif isinstance(node.parent, nodes.table):
self.body.append('</span>')
Expand Down
2 changes: 1 addition & 1 deletion tests/test_build_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -1664,7 +1664,7 @@ def test_html_permalink_icon(app):

assert ('<h1>The basic Sphinx documentation for testing<a class="headerlink" '
'href="#the-basic-sphinx-documentation-for-testing" '
'title="Permalink to this headline"><span>[PERMALINK]</span></a></h1>' in content)
'title="Permalink to this heading"><span>[PERMALINK]</span></a></h1>' in content)


@pytest.mark.sphinx('html', testroot='html_signaturereturn_icon')
Expand Down