Closed crtnx closed 1 year ago
thank you for your input.
i agree that providing more options for customizing the output is definitely a good idea. what you already can do (as a workaround) is changing the way tags are handled by providing custom functions for processing the start and end tags.
inscriptis = Inscriptis(html, config)
inscriptis.start_tag_handler_dict['a'] = my_handle_start_a
inscriptis.end_tag_handler_dict['a'] = my_handle_end_a
text = inscriptis.get_text()
i will think a little bit more on how to implement this in an elegant way. any suggestions are more than welcome.
Hi,
I didn't know about handlers possibility, seems it should be good enough for my purposes. Thanks!
My 2 cents:
Many thanks for you input - I have extended the documentation to cover these two points.
Hi there,
First, thanks a lot for the wonderful work. Second, treat the issue I am describing below more like an enhancement.
My problem is related to the way of displaying links when it is configured so. There is no way to configure how I want to see them. When enabled, an output includes both label and link, but for my purposes I want to see links only. I've looked at the source code and it is hardcoded this way...
Please, provide a way for displaying links only, without labels. Or maybe give us a way to overwrite default behavior for A element with a custom function. And keep up the good work!