-
Notifications
You must be signed in to change notification settings - Fork 793
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
fix(markdown): fix various markdown issues #370
Conversation
class CellWithImage extends Cell { | ||
render() { | ||
const { data, width, height, flex, style } = this.props; | ||
let borderWidth; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think, if you set the variables (borderWidth
, borderColor
) to default values, and thus remove the else
branch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -266,19 +306,33 @@ export class MarkdownHtmlView extends Component { | |||
styleText.textAlign = cellAlign[attribs.style]; | |||
} | |||
|
|||
const Component = | |||
node.children.filter( | |||
elem => elem.type === 'tag' && elem.name === 'img' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it would be possible to move this arrow function in a separate function, if it is used more than once?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful, thank you so so much @machour. You single-handedly made comments look beautiful in the app 🙌
Fix #363
The problems were :
<th>
was HTML escaped: it needed to be displayed usingdefaultRenderer
<img>
inside a<td>
caused a crash (View in Text): We created our own Cell component that avoids using<Text>
piece of code
as a<pre>
if inside a<li>
: Setting it to be pedantic helpedI also made images inside cells take 30% of the screen width while enlarging a bit images outside cells.