Skip to content

Commit 42a3d38

Browse files
authored
Merge pull request #152 from mschoettle/patch-3
Add datetime string to span element as title
2 parents 04db2bc + 4295ac3 commit 42a3d38

File tree

1 file changed

+3
-2
lines changed
  • src/mkdocs_git_revision_date_localized_plugin

1 file changed

+3
-2
lines changed

src/mkdocs_git_revision_date_localized_plugin/util.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,10 @@ def add_spans(date_formats: Dict[str, str]) -> Dict[str, str]:
186186
"""
187187
Wraps the date string in <span> elements with CSS identifiers.
188188
"""
189+
datetime_string = date_formats['datetime']
189190
for date_type, date_string in date_formats.items():
190191
date_formats[date_type] = (
191-
'<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-%s">%s</span>'
192-
% (date_type, date_string)
192+
'<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-%s" title="%s">%s</span>'
193+
% (date_type, datetime_string, date_string)
193194
)
194195
return date_formats

0 commit comments

Comments
 (0)