mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Add JavaScript Environment in the docs and fix a few things
This commit is contained in:
@@ -30,7 +30,7 @@ function splitHeader(content) {
|
||||
}
|
||||
|
||||
function backtickify(str) {
|
||||
var escaped = '`' + str.replace(/\\/g, '\\\\').replace(/`/g, '\\`') + '`';
|
||||
var escaped = '`' + str.replace(/\\/g, '\\\\').replace(/`/g, '\\`').replace(/{/g, '\\{') + '`';
|
||||
// Replace require( with require\( so node-haste doesn't replace example
|
||||
// require calls in the docs
|
||||
return escaped.replace(/require\(/g, 'require\\(');
|
||||
|
||||
Reference in New Issue
Block a user