AllenDowney / ThinkDataStructures

LaTeX source and supporting code for Think Data Structures: Algorithms and Information Retrieval in Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

firstPara is empty in Wiki page(Java).

aeomhs opened this issue · comments

Issue

Running WikiNodeExample, nothing printed in the terminal.

Cause

I guess that maybe wiki page is changed. When I saw page's DOM's tree, there was another <p class='mw-empty-elt'> element. (And there is no text.)

image

Solved

So I changed index 0 to 1. And I can see paragraph same the book.

// ...
Elements paras = content.select("p");
Element firstPara = paras.get(0); // if change 0 -> 1, can see same result with book.
//...

Also, I think can solve this problem through change wiki page. But I am not sure how to fix. I ever not contributed wiki page. :)