hbertrand commited on
Commit
2457179
1 Parent(s): 1a12df2

FIX: strip section name (#54)

Browse files
Files changed (1) hide show
  1. buster/parser.py +1 -1
buster/parser.py CHANGED
@@ -91,7 +91,7 @@ class SphinxParser(Parser):
91
  section_href = container.find_all("a", href=True, class_="headerlink")
92
 
93
  url = self.build_url(section["href"].strip().replace("\n", ""))
94
- name = section.parent.text
95
 
96
  # If sections has subsections, keep only the part before the first subsection
97
  if len(section_href) > 1 and container.section is not None:
 
91
  section_href = container.find_all("a", href=True, class_="headerlink")
92
 
93
  url = self.build_url(section["href"].strip().replace("\n", ""))
94
+ name = section.parent.text.strip()[:-1].replace("\n", "")
95
 
96
  # If sections has subsections, keep only the part before the first subsection
97
  if len(section_href) > 1 and container.section is not None: