mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2026-08-23 03:00:56 +00:00
Support HTML in hover_anchors
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user