docusaurus/docs/highlight.md
2018-08-11 16:29:52 +08:00

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>
);
}
}
```