Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image ALT tags, conversion options, footer URLs and silent DOM. #24

Closed
wants to merge 4 commits into from

Conversation

ravisorg
Copy link

No description provided.

ravisorg added 4 commits May 27, 2015 16:21
Html2Text::convert() can now accept an array as a second parameter, which allows passing in various options for the conversion process. This array is passed through to iterateOverNode().

Added an option (OPT_FOOTER_URLS) for relocating link URLs to the end of the document, replacing them with a numerical placeholder in the text. Makes the document much easier to read if there are a lot of long URLs in the HTML.
Make DOMDocument silent (not throwing any errors or warnings)
@ravisorg ravisorg changed the title Use the ALT tag in images (when available). Image ALT tags, conversion options, footer URLs and silent DOM. May 27, 2015
@@ -30,21 +47,38 @@ class Html2Text {
* </ul>
*
* @param string html the input HTML
* @param array An array of options of the Html2Text::OPT_* variety

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should start with @param array options An array ... instead. Variable name is missing.

@maliayas
Copy link

@ravisorg I've opened a PR to your repo which addresses some of the above notes.

@maliayas
Copy link

When you approve that PR, I think those commits will be automatically available here as well.

@soundasleep
Copy link
Owner

In 0.3.0 images will now display as alt tags, and links will display alt/title tags of the <img> or <a>.

@soundasleep
Copy link
Owner

Silent errors are now supported in #43

@soundasleep
Copy link
Owner

This PR has become out of date - if you would still like to contribute this change to this project, could you look at pulling the latest source and re-submitting the PR?

Thank you!

@soundasleep
Copy link
Owner

I will be adding conversion options in 1.0: #65

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants