Spaces:
Runtime error
Runtime error
Commit
·
c684eba
1
Parent(s):
914306a
Fix link issue in ToC
Browse files- apps/utils.py +1 -1
apps/utils.py
CHANGED
|
@@ -35,7 +35,7 @@ class Toc:
|
|
| 35 |
self._placeholder.markdown("\n".join(self._items), unsafe_allow_html=True)
|
| 36 |
|
| 37 |
def _markdown(self, text, level, space=""):
|
| 38 |
-
key = "".join(filter(str.isalnum, text)).lower()
|
| 39 |
|
| 40 |
st.markdown(f"<{level} id='{key}'>{text}</{level}>", unsafe_allow_html=True)
|
| 41 |
self._items.append(f"{space}* <a href='#{key}'>{text}</a>")
|
|
|
|
| 35 |
self._placeholder.markdown("\n".join(self._items), unsafe_allow_html=True)
|
| 36 |
|
| 37 |
def _markdown(self, text, level, space=""):
|
| 38 |
+
key = "".join(filter(str.isalnum, text)).lower().replace('+','')
|
| 39 |
|
| 40 |
st.markdown(f"<{level} id='{key}'>{text}</{level}>", unsafe_allow_html=True)
|
| 41 |
self._items.append(f"{space}* <a href='#{key}'>{text}</a>")
|