improve docs code blocks highlighting (#2049)
Summary: This PR adds missing Objective-C entry to the Docusaurus config, fixes Objective-C code blocks label and adds or replaces several code block labels to improve the currently highlighted blocks. Prism in Docusaurus by default also includes syntax highlight for `jsx` and `tsx`, which improves the nodes and props highlight, so I have used those syntaxes in few places too. I have also fixed one typo that I have spotted and my IDE made a cleanup of whitespaces in edited files. ## Changelog * [website] improve docs code blocks highlighting Pull Request resolved: https://github.com/facebook/flipper/pull/2049 Test Plan: The changes have been tested running Flipper website on `localhost`. ## Preview <img width="650" alt="Screenshot 2021-03-12 150934" src="https://user-images.githubusercontent.com/719641/110951135-fff20d00-8344-11eb-96db-1bdc82c8d5ea.png"> <img width="649" alt="Screenshot 2021-03-12 151022" src="https://user-images.githubusercontent.com/719641/110951268-2ca62480-8345-11eb-9d3b-1a48f1267776.png"> Reviewed By: priteshrnandgaonkar Differential Revision: D27336599 Pulled By: passy fbshipit-source-id: c2dfb3d8cad4675da0f5e1270cada1e56a0175c0
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e4a814502a
commit
40e6cdebb1
@@ -94,7 +94,7 @@ Once you have added the pod, initialise the plugin and add it to the `FlipperCli
|
||||
<Tabs defaultValue="ios" values={[{ label: 'iOS', value: 'ios'}, { label: 'Swift', value: 'swift'}]}>
|
||||
<TabItem value="ios">
|
||||
|
||||
```objective-c
|
||||
```objc
|
||||
#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
|
||||
|
||||
SKDescriptorMapper *mapper = [[SKDescriptorMapper alloc] initWithDefaults];
|
||||
@@ -120,13 +120,13 @@ If you want to enable [ComponentKit support](https://github.com/facebook/compone
|
||||
|
||||
```ruby
|
||||
pod 'FlipperKit/FlipperKitLayoutComponentKitSupport', '~>' + flipperkit_version
|
||||
```
|
||||
```
|
||||
Once you have added the pod you will then need to augment the descriptor with Componentkit-specific settings as shown below.
|
||||
|
||||
<Tabs defaultValue="ios" values={[{ label: 'iOS', value: 'ios'}, { label: 'Swift', value: 'swift'}]}>
|
||||
<TabItem value="ios">
|
||||
|
||||
```objective-c
|
||||
```objc
|
||||
#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
|
||||
#import <FlipperKitLayoutComponentKitSupport/FlipperKitLayoutComponentKitSupport.h>
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ Initialise the plugin in the following way:
|
||||
<Tabs defaultValue="ios" values={[{ label: 'iOS', value: 'ios'}, { label: 'Swift', value: 'swift'}]}>
|
||||
<TabItem value="ios">
|
||||
|
||||
```objective-c
|
||||
```objc
|
||||
#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
|
||||
|
||||
[[FlipperClient sharedClient] addPlugin: [[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
|
||||
|
||||
Reference in New Issue
Block a user