Skip to content

Commit

Permalink
Parse public fields correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
ergl committed May 28, 2018
1 parent 7bdd975 commit 70a9a5c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/parsePackage.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ function get_field_name(title, field) {
function gather_fields(title, elt) {
const all_siblings = [];
while (elt !== null && elt.tagName !== 'H2') {
if (elt.tagName === 'UL') {
const field_name = parse_field(elt.children[0].textContent);
if (elt.tagName === 'H3') {
const field_name = parse_field(elt.textContent);
all_siblings.push({
id: 'public-fields',
id: elt.getAttribute('id'),
type: 'Field',
name: get_field_name(title, field_name)
});
Expand Down

0 comments on commit 70a9a5c

Please sign in to comment.