Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blockquotes broken in 1.2.0 #22

Open
zivester opened this issue Jan 14, 2019 · 0 comments
Open

Blockquotes broken in 1.2.0 #22

zivester opened this issue Jan 14, 2019 · 0 comments

Comments

@zivester
Copy link

zivester commented Jan 14, 2019

I believe there was a regression introduced in #17 . I cannot render a simple blockquote now with react-native (expo and native build).

> This is a quote

On 1.1.9 it renders correctly. On 1.2.0 it immediately fails with: "Unexpected view type nested under text node."

As I'm also running react-native @ 0.55, I'm currently exploring if it's possible to revert the isTextOnly removal and get both images and quotes working at the same time. It's not possible to have both working in either build.

EDIT: I brought back Util.isTextOnly and the detecting block, and I now have images working (but still no blockQuotes)

        if (Utils.isTextOnly(nodes)) {
            if (isBlockQuote) {
                style.push(styles.blockQuote)
                return(
                    <View key={'blockQuote_' + key} style={[styles.block, styles.blockQuote]}>
                        <Text>{nodes}</Text>
                    </View>
                );
            } else {
                return(
                    <Text key={'block_' + key} style={styles.block}>
                        <Text style={styles.text}>
                            <Text style={styles.text}>
                                {nodes}
                            </Text>
                        </Text>
                    </Text>
                );
            }
        } else {
            return (
                <View key={'block_' + key} style={styles.block}>
                    {nodes}
                </View>
            );
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant