mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-05 05:07:14 +02:00
31 lines
No EOL
536 B
Markdown
31 lines
No EOL
536 B
Markdown
---
|
|
id: highlight
|
|
title: Syntax highlighting demo
|
|
---
|
|
|
|
```cpp
|
|
#include<bits/stdc++.h>
|
|
using namespace std;
|
|
|
|
int main() {
|
|
cout << "Hello world\n";
|
|
return 0;
|
|
}
|
|
|
|
```
|
|
|
|
```js
|
|
class Example extends React.Component {
|
|
render() {
|
|
return (
|
|
<View style={{flex: 1, alignItems: 'center', justifyContent: 'center'}}>
|
|
<Text>Docusaurus</Text>
|
|
<Button
|
|
title="Click me"
|
|
onPress={() => this.props.navigation.push('Docusaurus')}
|
|
/>
|
|
</View>
|
|
);
|
|
}
|
|
}
|
|
``` |