iamacup / react-native-markdown-display

React Native 100% compatible CommonMark renderer
MIT License
568 stars 167 forks source link

Implicit padding on text #155

Closed trajano closed 9 months ago

trajano commented 2 years ago

There seems to be an implicit padding on text. Is there a way of removing it without affecting the semantics of a paragraph?

    <VStack space="4">
      <Box borderWidth="1">
        <DefaultMarkdown>asdf</DefaultMarkdown>
      </Box>
      <Box borderWidth="1">
        <Text>asdf</Text>
      </Box>
    </VStack>

image

lvwrence commented 2 years ago

@trajano not sure if you figured it out already, but you need to override marginTop and marginBottom in paragraph here: https://github.com/iamacup/react-native-markdown-display/blob/master/src/lib/styles.js#L174

NickWhiu commented 2 years ago

May as well close issue, Ivwrence's suggestion works & OP liked it above.