Benjamin-Dobell / react-native-markdown-view

MarkdownView for React Native
MIT License
190 stars 77 forks source link

Support for only specifying image height or width #24

Closed skovhus closed 6 years ago

skovhus commented 6 years ago

This PR adds support for an optional height and width for the image. Currently both of these are required by the library, but many markdown implementations support only providing one of them.

So you can do ![](./pic/pic1s.png =250x).

Besides I'm exporting some regular expressions parts and helpers. These are very useful if a user wants to customize the image parser.

Benjamin-Dobell commented 6 years ago

Thanks for the contribution.

I'm quite happy to merge the optional image width/height, however could you please force push away the "Export image parsing helpers" commit? It seems as though it's unrelated and should be a separate PR.

Although, I should be up-front, even if in a separate PR, I'm not particularly keen to merge "Export image parsing helpers" as it's exposing internals of this library which are subject to change.

skovhus commented 6 years ago

t seems as though it's unrelated and should be a separate PR.

Totally fair. It should be ready for review now.

And I also understand the concern of exposing internals of the library.

Benjamin-Dobell commented 6 years ago

Sorry it took so long to merge this!

skovhus commented 6 years ago

Don't worry about that. : )