GH-671 Fixed entire link being made lower case (#688)
This commit is contained in:
parent
3a233455a6
commit
6432a16fb2
1 changed files with 8 additions and 1 deletions
|
|
@ -19,7 +19,14 @@ export default class MarkdownLink extends PureComponent {
|
|||
}
|
||||
|
||||
handlePress = () => {
|
||||
const url = this.props.href.toLowerCase();
|
||||
// Android doesn't like the protocol being upper case
|
||||
let url = this.props.href;
|
||||
|
||||
const index = url.indexOf(':');
|
||||
if (index !== -1) {
|
||||
const protocol = url.substring(0, index);
|
||||
url = protocol.toLowerCase() + url.substring(index);
|
||||
}
|
||||
|
||||
Linking.canOpenURL(url).then((supported) => {
|
||||
if (supported) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue