Support HTML in hover_anchors

This commit is contained in:
mDuo13
2020-12-16 16:55:36 -08:00
parent 7126193353
commit e29afaae33
2 changed files with 4 additions and 2 deletions

View File

@@ -77,7 +77,7 @@ targets:
display_name: XRPL.org
<<: *defaults
prefix: ""
hover_anchors: "¶"
hover_anchors: <i class="fa fa-link"></i>
link_subs:
"./src/api-v3/paths/preparations/payments.ts": "https://github.com/xpring-eng/xrp-api/blob/master/src/api-v3/paths/preparations/payments.ts"
readability_goals:

View File

@@ -10,6 +10,8 @@
################################################################################
import re
from bs4 import BeautifulSoup
## HTML5's 'id' attribute requirements are:
## - Must be at least one character in length.
## - Must not contain ASCII whitespace.
@@ -69,5 +71,5 @@ def filter_soup(soup, currentpage={}, **kwargs):
"href": "#"+new_id,
"class": "hover_anchor",
"aria-hidden": "true"})
hoverlink.append(hoveranchor_contents)
hoverlink.append(BeautifulSoup(hoveranchor_contents, "html.parser"))
h.append(hoverlink)