Skip to content

Commit e152e19

Browse files
authored
Merge pull request #2702 from capjamesg/patch-1
Add rel=edit attribute to "Suggest an edit" link
2 parents 7e68d01 + bd97611 commit e152e19

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/front-end/templates/index.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@
181181
</a>
182182
{{/if}}
183183
{{#if git_repository_edit_url}}
184-
<a href="{{git_repository_edit_url}}" title="Suggest an edit" aria-label="Suggest an edit">
184+
<a href="{{git_repository_edit_url}}" title="Suggest an edit" aria-label="Suggest an edit" rel="edit">
185185
<i id="git-edit-button" class="fa fa-edit"></i>
186186
</a>
187187
{{/if}}

tests/testsuite/rendering.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fn edit_url_template() {
88
BookTest::from_dir("rendering/edit_url_template").check_file_contains(
99
"book/index.html",
1010
"<a href=\"https://github.com/rust-lang/mdBook/edit/master/guide/src/README.md\" \
11-
title=\"Suggest an edit\" aria-label=\"Suggest an edit\">",
11+
title=\"Suggest an edit\" aria-label=\"Suggest an edit\" rel=\"edit\">",
1212
);
1313
}
1414

@@ -18,7 +18,7 @@ fn edit_url_template_explicit_src() {
1818
BookTest::from_dir("rendering/edit_url_template_explicit_src").check_file_contains(
1919
"book/index.html",
2020
"<a href=\"https://github.com/rust-lang/mdBook/edit/master/guide/src2/README.md\" \
21-
title=\"Suggest an edit\" aria-label=\"Suggest an edit\">",
21+
title=\"Suggest an edit\" aria-label=\"Suggest an edit\" rel=\"edit\">",
2222
);
2323
}
2424

0 commit comments

Comments
 (0)