Remove empty lines to ensure JavaScript is loaded
Summary: This is not currently an issue within the current site infrastructure, but eliminating these empty lines will ensure the code is not parsed as plain markdown text by some libraries. Closes https://github.com/facebook/react-native/pull/16917 Differential Revision: D6389212 Pulled By: hramos fbshipit-source-id: 853ace6f31c32abee36b563198ec79ca3c55176f
This commit is contained in:
parent
b6f1a6085f
commit
75123c614b
|
@ -646,7 +646,6 @@ to the [Tutorial](docs/tutorial.html).
|
|||
container.className.replace(RegExp('display-' + type + '-[a-z]+ ?'), '');
|
||||
event && event.preventDefault();
|
||||
}
|
||||
|
||||
function convertBlocks() {
|
||||
// Convert <div>...<span><block /></span>...</div>
|
||||
// Into <div>...<block />...</div>
|
||||
|
@ -671,12 +670,10 @@ to the [Tutorial](docs/tutorial.html).
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
function guessPlatformAndOS() {
|
||||
if (!document.querySelector('block')) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If we are coming to the page with a hash in it (i.e. from a search, for example), try to get
|
||||
// us as close as possible to the correct platform and dev os using the hashtag and block walk up.
|
||||
var foundHash = false;
|
||||
|
@ -699,7 +696,6 @@ to the [Tutorial](docs/tutorial.html).
|
|||
if (parent.tagName === 'BLOCK') {
|
||||
// Could be more than one target os and dev platform, but just choose some sort of order
|
||||
// of priority here.
|
||||
|
||||
// Dev OS
|
||||
if (parent.className.indexOf('mac') > -1) {
|
||||
displayTab('os', 'mac');
|
||||
|
@ -717,7 +713,6 @@ to the [Tutorial](docs/tutorial.html).
|
|||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
// Target Platform
|
||||
if (parent.className.indexOf('ios') > -1) {
|
||||
displayTab('platform', 'ios');
|
||||
|
@ -730,7 +725,6 @@ to the [Tutorial](docs/tutorial.html).
|
|||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
// Guide
|
||||
if (parent.className.indexOf('native') > -1) {
|
||||
displayTab('guide', 'native');
|
||||
|
@ -743,7 +737,6 @@ to the [Tutorial](docs/tutorial.html).
|
|||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
parent = parent.parentElement;
|
||||
|
@ -751,7 +744,6 @@ to the [Tutorial](docs/tutorial.html).
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Do the default if there is no matching hash
|
||||
if (!foundHash) {
|
||||
var isMac = navigator.platform === 'MacIntel';
|
||||
|
@ -765,7 +757,6 @@ to the [Tutorial](docs/tutorial.html).
|
|||
displayTab('language', 'objc');
|
||||
}
|
||||
}
|
||||
|
||||
convertBlocks();
|
||||
guessPlatformAndOS();
|
||||
</script>
|
||||
|
|
|
@ -828,7 +828,6 @@ At this point you can continue developing your app as usual. Refer to our [debug
|
|||
container.className.replace(RegExp('display-' + type + '-[a-z]+ ?'), '');
|
||||
event && event.preventDefault();
|
||||
}
|
||||
|
||||
function convertBlocks() {
|
||||
// Convert <div>...<span><block /></span>...</div>
|
||||
// Into <div>...<block />...</div>
|
||||
|
@ -853,12 +852,10 @@ At this point you can continue developing your app as usual. Refer to our [debug
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
function guessPlatformAndOS() {
|
||||
if (!document.querySelector('block')) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If we are coming to the page with a hash in it (i.e. from a search, for example), try to get
|
||||
// us as close as possible to the correct platform and dev os using the hashtag and block walk up.
|
||||
var foundHash = false;
|
||||
|
@ -881,7 +878,6 @@ At this point you can continue developing your app as usual. Refer to our [debug
|
|||
if (parent.tagName === 'BLOCK') {
|
||||
// Could be more than one target os and dev platform, but just choose some sort of order
|
||||
// of priority here.
|
||||
|
||||
// Dev OS
|
||||
if (parent.className.indexOf('mac') > -1) {
|
||||
displayTab('os', 'mac');
|
||||
|
@ -899,7 +895,6 @@ At this point you can continue developing your app as usual. Refer to our [debug
|
|||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
// Target Platform
|
||||
if (parent.className.indexOf('ios') > -1) {
|
||||
displayTab('platform', 'ios');
|
||||
|
@ -912,7 +907,6 @@ At this point you can continue developing your app as usual. Refer to our [debug
|
|||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
// Guide
|
||||
if (parent.className.indexOf('native') > -1) {
|
||||
displayTab('guide', 'native');
|
||||
|
@ -925,7 +919,6 @@ At this point you can continue developing your app as usual. Refer to our [debug
|
|||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
parent = parent.parentElement;
|
||||
|
@ -933,7 +926,6 @@ At this point you can continue developing your app as usual. Refer to our [debug
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Do the default if there is no matching hash
|
||||
if (!foundHash) {
|
||||
var isMac = navigator.platform === 'MacIntel';
|
||||
|
@ -947,7 +939,6 @@ At this point you can continue developing your app as usual. Refer to our [debug
|
|||
displayTab('language', 'objc');
|
||||
}
|
||||
}
|
||||
|
||||
convertBlocks();
|
||||
guessPlatformAndOS();
|
||||
</script>
|
||||
|
|
|
@ -365,7 +365,6 @@ You have built a great app using React Native, and you are now itching to releas
|
|||
container.className = 'display-' + type + '-' + value + ' ' +
|
||||
container.className.replace(RegExp('display-' + type + '-[a-z]+ ?'), '');
|
||||
}
|
||||
|
||||
function convertBlocks() {
|
||||
// Convert <div>...<span><block /></span>...</div>
|
||||
// Into <div>...<block />...</div>
|
||||
|
@ -390,12 +389,10 @@ You have built a great app using React Native, and you are now itching to releas
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
function guessPlatformAndOS() {
|
||||
if (!document.querySelector('block')) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If we are coming to the page with a hash in it (i.e. from a search, for example), try to get
|
||||
// us as close as possible to the correct platform and dev os using the hashtag and block walk up.
|
||||
var foundHash = false;
|
||||
|
@ -418,7 +415,6 @@ You have built a great app using React Native, and you are now itching to releas
|
|||
if (parent.tagName === 'BLOCK') {
|
||||
// Could be more than one target os and dev platform, but just choose some sort of order
|
||||
// of priority here.
|
||||
|
||||
// Dev OS
|
||||
if (parent.className.indexOf('mac') > -1) {
|
||||
displayTab('os', 'mac');
|
||||
|
@ -436,7 +432,6 @@ You have built a great app using React Native, and you are now itching to releas
|
|||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
// Target Platform
|
||||
if (parent.className.indexOf('ios') > -1) {
|
||||
displayTab('platform', 'ios');
|
||||
|
@ -449,7 +444,6 @@ You have built a great app using React Native, and you are now itching to releas
|
|||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
// Guide
|
||||
if (parent.className.indexOf('native') > -1) {
|
||||
displayTab('guide', 'native');
|
||||
|
@ -462,7 +456,6 @@ You have built a great app using React Native, and you are now itching to releas
|
|||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
parent = parent.parentElement;
|
||||
|
@ -470,7 +463,6 @@ You have built a great app using React Native, and you are now itching to releas
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Do the default if there is no matching hash
|
||||
if (!foundHash) {
|
||||
var isMac = navigator.platform === 'MacIntel';
|
||||
|
@ -484,7 +476,6 @@ You have built a great app using React Native, and you are now itching to releas
|
|||
displayTab('language', 'objc');
|
||||
}
|
||||
}
|
||||
|
||||
convertBlocks();
|
||||
guessPlatformAndOS();
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue