Repository navigation
[Feature Request]: Expose CustomHTML2Text as class property in DefaultMarkdownGenerator #587
dmurat
started this conversation in
Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
What needs to be done?
I would like to be able to configure my own extension of
CustomHTML2Textto be used inDefaultMarkdownGeneratorclass.What problem does this solve?
I could supply my own extension of
CustomHTML2Textfor customized rendering of HTML tags into markdown. For example, for improved code block rendering.Target users/beneficiaries
Users that need to fine tune HTML-2-Markdown rendering.
Current alternatives/workarounds
At the moment I'm using monkey-patching for providing my own extension of
CustomHTML2Text. Together with my customWebScrapingStrategyextension I'm able to:By having the ability to provide the extension of
CustomHTML2Text, I could avoid monkey-patching.Proposed approach
Add an instance of
CustomHTML2Textas constructor parameter ofDefaultMarkdownGenerator. Before the usage, for example fromgenerate_markdownmethodupdate_paramsshould be called withbaseurlparam.All reactions