2023-01-25 16:54:14 +08:00
|
|
|
SilverBullet comes with syntax highlighters for various programming languages. This page demonstrates some:
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
name: Pete
|
|
|
|
```
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
function myFunc() {
|
|
|
|
console.log("Hello World!");
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
function myFunc(name: string) {
|
|
|
|
console.log("Hello", name);
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
```sql
|
|
|
|
select * from my_table;
|
|
|
|
```
|
|
|
|
|
|
|
|
```c++
|
|
|
|
class MyClass {
|
|
|
|
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
```rust
|
|
|
|
fn main() {
|
|
|
|
// Print text to the console
|
|
|
|
println!("Hello World!");
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
```swift
|
2024-12-26 15:17:48 +08:00
|
|
|
func myFunc() {
|
|
|
|
print("Hello World!")
|
2023-01-25 16:54:14 +08:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
```xml
|
|
|
|
<MyTag attribute="cool">
|
|
|
|
|
|
|
|
</MyTag>
|
|
|
|
```
|
|
|
|
|
2023-08-15 14:53:09 +08:00
|
|
|
```html
|
|
|
|
<b>Regular HTML</b>
|
|
|
|
```
|
|
|
|
|
2023-01-25 16:54:14 +08:00
|
|
|
```kotlin
|
|
|
|
class MyClass {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
```dart
|
|
|
|
void main() {
|
|
|
|
print('Hello, World!');
|
|
|
|
}
|
2023-10-03 20:16:33 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
```c
|
|
|
|
void main() {
|
|
|
|
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2024-07-22 23:33:50 +08:00
|
|
|
```ruby
|
|
|
|
class BankAccount
|
|
|
|
attr_accessor :balance, :account_holder
|
|
|
|
end
|
|
|
|
```
|