Feat: Add syntax highlighting for a lot more languages
This commit is contained in:
102
samples/diff.patch
Normal file
102
samples/diff.patch
Normal file
@@ -0,0 +1,102 @@
|
||||
--- ./samples/toml.toml 2025-12-26 19:02:50.480936043 +0000
|
||||
+++ ./samples/yaml.yml 2025-12-26 19:03:27.879765974 +0000
|
||||
@@ -2,52 +2,65 @@
|
||||
# Basic types
|
||||
# ============================================================
|
||||
|
||||
-title = "Example TOML Configuration"
|
||||
-enabled = true
|
||||
-count = 42
|
||||
-pi = 3.14159
|
||||
-empty = ""
|
||||
+title: "Example YAML Configuration"
|
||||
+enabled: true
|
||||
+count: 42
|
||||
+pi: 3.14159
|
||||
+empty: ""
|
||||
|
||||
# ============================================================
|
||||
-# Arrays
|
||||
+# Arrays / Lists
|
||||
# ============================================================
|
||||
-fruits = ["apple", "banana", "cherry"]
|
||||
-numbers = [1, 2, 3, 4, 5]
|
||||
+fruits:
|
||||
+ - apple
|
||||
+ - banana
|
||||
+ - cherry
|
||||
|
||||
-# Nested array
|
||||
-matrix = [[1, 2], [3, 4]]
|
||||
+numbers:
|
||||
+ - 1
|
||||
+ - 2
|
||||
+ - 3
|
||||
+ - 4
|
||||
+ - 5
|
||||
+
|
||||
+matrix:
|
||||
+ - [1, 2]
|
||||
+ - [3, 4]
|
||||
|
||||
# ============================================================
|
||||
-# Tables
|
||||
+# Nested objects / maps
|
||||
# ============================================================
|
||||
-[owner]
|
||||
-name = "Alice"
|
||||
-dob = 1979-05-27T07:32:00Z
|
||||
-
|
||||
-[database]
|
||||
-server = "192.168.1.1"
|
||||
-ports = [ 8001, 8001, 8002 ]
|
||||
-connection_max = 5000
|
||||
-enabled = true
|
||||
+owner:
|
||||
+ name: Alice
|
||||
+ dob: 1979-05-27T07:32:00Z
|
||||
|
||||
-[servers.alpha]
|
||||
-ip = "10.0.0.1"
|
||||
-dc = "east"
|
||||
+database:
|
||||
+ server: 192.168.1.1
|
||||
+ ports:
|
||||
+ - 8001
|
||||
+ - 8001
|
||||
+ - 8002
|
||||
+ connection_max: 5000
|
||||
+ enabled: true
|
||||
|
||||
-[servers.beta]
|
||||
-ip = "10.0.0.2"
|
||||
-dc = "west"
|
||||
+servers:
|
||||
+ alpha:
|
||||
+ ip: 10.0.0.1
|
||||
+ dc: east
|
||||
+ beta:
|
||||
+ ip: 10.0.0.2
|
||||
+ dc: west
|
||||
|
||||
# ============================================================
|
||||
-# Inline tables
|
||||
+# Multiline string
|
||||
# ============================================================
|
||||
-clients = { name = "Bob", age = 30, active = true }
|
||||
+description: |
|
||||
+ This is a YAML file
|
||||
+ used for testing syntax highlighting.
|
||||
+ It supports multiple lines.
|
||||
|
||||
# ============================================================
|
||||
-# Multiline strings
|
||||
+# Special characters
|
||||
# ============================================================
|
||||
-description = """
|
||||
-This is a TOML file
|
||||
-used for testing syntax highlighting.
|
||||
-It supports multiple lines.
|
||||
-"""
|
||||
+regex_pattern: "^[A-Za-z0-9_]+$"
|
||||
+path: "C:\\Users\\Alice\\Documents"
|
||||
Reference in New Issue
Block a user