Closed prescottprue closed 7 years ago
The error is being generated from this snippet:
// Try and find the language definition in components folder
if (!languages[lang]) {
try {
requireSyntax(lang);
} catch (e) {
console.warn('Failed to load prism syntax: ' + lang);
console.warn(e);
}
}
Something is tripping up Gitbook where it's passing the wrong value in block.kwargs.language
. Can you share a repo with the issue so that I can run?
The docs of react-redux-firebase
are generated using gitbook, and it is where I am seeing the error.
If you pull and run npm run docs:build
after npm installing, then you should see the error (where the picture I posted came from).
I just cloned the repo and i see the following in docs/recipes/react-native.md
:
```objc
// add this line before @implementation AppDelegate
#import <RNGoogleSignin/RNGoogleSignin.h>
// add this method before @end
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
return [RNGoogleSignin application:application openURL:url sourceApplication:sourceApplication annotation:annotation];
}
Switching to objectivec
fixes the issue. If you really want to use objc
to highlight the code then create a map in the options:
pluginsConfig": {
"prism": {
"lang": {
"objc": "objectivec"
}
}
}
Wow, I didn't even notice that in there 😑
Great to know about the lang mapping.
Thanks! Apologies for the false issue.
No worries 😁
Running
v2.2.0
I receive the following error:I am in no way using or attempting to load objective c syntax highlighting. Is there a way to silence the warnings or not include
objc
?