all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] scanrefs: remove term prefix from title
@ 2020-11-09 14:59 Aaron Lauterer
  2020-11-09 15:36 ` [pbs-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Aaron Lauterer @ 2020-11-09 14:59 UTC (permalink / raw)
  To: pbs-devel

It can happen, that a title is defined as term in the following way:
:term:`My title`

This patch checks for it and strips the leading part and the last `.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---
 docs/_ext/proxmox-scanrefs.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/docs/_ext/proxmox-scanrefs.py b/docs/_ext/proxmox-scanrefs.py
index 58176fe5..8de17620 100644
--- a/docs/_ext/proxmox-scanrefs.py
+++ b/docs/_ext/proxmox-scanrefs.py
@@ -93,6 +93,9 @@ class ReflabelMapper(Builder):
                     logger.info('traversing section {}'.format(title.astext()))
                     ref_name = getattr(title, 'rawsource', title.astext())
 
+                    if (ref_name[:7] == ':term:`'):
+                        ref_name = ref_name[7:-1]
+
                     self.env.online_help[labelid] = {'link': '', 'title': ''}
                     self.env.online_help[labelid]['link'] = "/docs/" + os.path.basename(filename_html) + "#{}".format(labelid)
                     self.env.online_help[labelid]['title'] = ref_name
-- 
2.20.1





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pbs-devel] applied: [PATCH proxmox-backup] scanrefs: remove term prefix from title
  2020-11-09 14:59 [pbs-devel] [PATCH proxmox-backup] scanrefs: remove term prefix from title Aaron Lauterer
@ 2020-11-09 15:36 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2020-11-09 15:36 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Aaron Lauterer

On 09.11.20 15:59, Aaron Lauterer wrote:
> It can happen, that a title is defined as term in the following way:
> :term:`My title`
> 
> This patch checks for it and strips the leading part and the last `.
> 
> Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
> ---
>  docs/_ext/proxmox-scanrefs.py | 3 +++
>  1 file changed, 3 insertions(+)
> 
>

applied, thanks! also updated the OnlineHelp js file as followup.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-09 15:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-09 14:59 [pbs-devel] [PATCH proxmox-backup] scanrefs: remove term prefix from title Aaron Lauterer
2020-11-09 15:36 ` [pbs-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal