iamacup / react-native-markdown-display

React Native 100% compatible CommonMark renderer
MIT License
604 stars 172 forks source link

In the flex row layout, the list will be truncated #197

Closed xuergo closed 1 year ago

xuergo commented 1 year ago

This may not be a bug, but it troubles me. I share it with others in the hope of being helpful

<View className='flex-row'>
  <View className='w-[10px] h-[10px] bg-black'></View>
  <Markdown>
    {` 1. hi`}
  </Markdown>
</View>

Bad

image
 <View className='flex-row'>
          <View className='w-[10px] h-[10px] bg-black'></View>
          <Markdown style={{ ordered_list_content: { flex: 0 } }} >
            {` 1. hi`}
          </Markdown>
        </View>

Good

image