Skip to content

Commit 6254e9b

Browse files
committed
fix: reference section
1 parent 4348c90 commit 6254e9b

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

themes/tfsci/assets/main.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,15 @@ main > .container {
9595
li > ol:last-child {
9696
margin-top: 0.25em;
9797
}
98+
99+
ul.wrap li,
100+
ol.wrap li {
101+
&,
102+
a {
103+
text-wrap: wrap;
104+
word-break: break-all;
105+
}
106+
}
98107
}
99108

100109
.content.archives {

themes/tfsci/assets/main.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Promise.resolve()
1212
.then(onSaveAnchor)
1313
.then(onRestoreEmailAddress)
1414
.then(onReferenceLinks)
15+
.then(onReferenceSection)
1516
.then(onAbbreviation)
1617
.then(onLinkTitle)
1718

@@ -67,6 +68,14 @@ function onRestoreEmailAddress() {
6768
}
6869
}
6970

71+
function onReferenceSection() {
72+
const content = document.querySelector('article.content')
73+
if (!content) return
74+
const references = content.querySelector('#references + ul')
75+
if (!references) return
76+
references.classList.add('wrap')
77+
}
78+
7079
function onReferenceLinks() {
7180
const content = document.querySelector('article.content')
7281
if (!content) return

0 commit comments

Comments
 (0)