Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions HTMLView.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {Linking, Platform, StyleSheet, View, ViewPropTypes} from 'react-native';
const boldStyle = {fontWeight: '500'};
const italicStyle = {fontStyle: 'italic'};
const underlineStyle = {textDecorationLine: 'underline'};
const strikethroughStyle = {textDecorationLine: 'line-through'};
const codeStyle = {fontFamily: Platform.OS === 'ios' ? 'Menlo' : 'monospace'};

const baseStyles = StyleSheet.create({
Expand All @@ -14,6 +15,8 @@ const baseStyles = StyleSheet.create({
i: italicStyle,
em: italicStyle,
u: underlineStyle,
s: strikethroughStyle,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should also add this for the deprecated strike tag, given that this code also recognizes the old b and i tags

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strike: strikethroughStyle,
pre: codeStyle,
code: codeStyle,
a: {
Expand Down