node-html-to-text icon indicating copy to clipboard operation
node-html-to-text copied to clipboard

Convert video tags to links

Open evanrmurphy opened this issue 9 years ago • 1 comments

Currently, node-html-to-text ignores video tags. This PR adds support for video tags similar to img tags.

So if a video is encountered in either of these formats, with a src attribute or source tag...

<video src="http://example.com/a.mp4">
<video>
  <source src="http://example.com/a.mp4">
<video>

...it will output a bracketed link to the video:

[http://example.com/a.mp4]

It also adds an ignoreVideo option that works the same way as ignoreImage.

This would resolve issue #103.

My team is finding your library very useful. Thanks for creating it!

evanrmurphy avatar Aug 12 '16 01:08 evanrmurphy

Thanks for your pull request. Before I can accept it I need some unit tests for the new feature. Please add some test cases to the test/html-to-text.js file.

mlegenhausen avatar Aug 12 '16 06:08 mlegenhausen