Open zirkelc opened 4 months ago
Hi, thanks for the detailed example, as you say this seems to be a bug (item 2), a potential enhancement (button), and a problem with the source at the same time (I think <collapsible-content>
is not a valid HTML tag). I need to check what can reasonably be done here.
Hi,
I hope I'm not flooding you with too many issues 😄
I have an FAQ page that uses
<button />
to show and hide the corresponding content. It looks roughly like this:The
<button />
contains the question and the<collapsible-content/>
contains the answer. However, when I extract the content, the text from the button is not extracted. This usually makes sense because buttons are not really semantic elements, but in this case the buttons contains valuable information.Here's the full example
faq.html
:Here is how I run it:
The received result:
There seems to be also a small bug, because it extracts the first and third answer but omits the second answer:
2. Answer: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua
That's the result I would like to get:
The FAQ elements contain semantic information from schema.org, like
itemtype="https://schema.org/Question"
and other attributes likeitemprop
anditemscope
. Maybe it is possible to implement a rule that keeps these semantic elements in the result?