Benjamin-Dobell / react-native-markdown-view

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

Update rule PropTypes #20

Closed jpdenford closed 6 years ago

jpdenford commented 6 years ago

SimpleMarkdown throws error when order property not present on new rule. Update the rule PropTypes to allow a number (aimed at the order property however may be better to use PropTypes.shape and specify properties individually).

Benjamin-Dobell commented 6 years ago

Not too sure about this one. Could you post an example that fails?

jpdenford commented 6 years ago

With a rule eg:

linkWithChevron: {
          match: ...,
          parse: () => ...,
          render: () => ...,
          order: 1
      } 

When the rule has no order property then I get this error from simple-markdown:

without-order-on-rule

Once I've added the order property then the error from simple-markdown disappears but then I get the error from the PropTypes check (mentioned above):

with-order-on-rule
Benjamin-Dobell commented 6 years ago

👍