about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-08-19 09:56:55 +0200
committerbptato <nincsnevem662@gmail.com>2023-08-19 10:02:17 +0200
commit01dfb3abe8d3a282a127aafd34e55fff1ff9d2df (patch)
tree36104b6aedfe1d82636133f8da441f04afe5122b
parentca30c22f03870b8f8aa37939f2f3db737e6a1737 (diff)
downloadchawan-01dfb3abe8d3a282a127aafd34e55fff1ff9d2df.tar.gz
toml: fix quotation chars in multiline strings
-rw-r--r--src/config/toml.nim16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/config/toml.nim b/src/config/toml.nim
index 66f8335f..a4e13dea 100644
--- a/src/config/toml.nim
+++ b/src/config/toml.nim
@@ -159,13 +159,15 @@ proc consumeString(state: var TomlParser, first: char):
     if c == '\n' and not multiline:
       return state.err("newline in string")
     elif c == first:
-      if multiline and state.has(1):
-        let c2 = state.peek(0)
-        let c3 = state.peek(1)
-        if c2 == first and c3 == first:
-          discard state.consume()
-          discard state.consume()
-          break
+      if multiline:
+        if state.has(1):
+          let c2 = state.peek(0)
+          let c3 = state.peek(1)
+          if c2 == first and c3 == first:
+            discard state.consume()
+            discard state.consume()
+            break
+        res &= c
       else:
         break
     elif first == '"' and c == '\\':
it/ranger/gui/bar.py?id=ea87d00524778fd7188180acb1119d0ecb43613e'>ea87d005 ^
9cce9fab ^

ea87d005 ^
9cce9fab ^




























ea87d005 ^
af17562d ^
9cce9fab ^


9cce9fab ^

af17562d ^


9cce9fab ^

af17562d ^
9cce9fab ^

473daebb ^



af17562d ^


9cce9fab ^








ea87d005 ^
9cce9fab ^









59698d9d ^
9cce9fab ^
ea87d005 ^
9cce9fab ^

ea87d005 ^
9cce9fab ^










ea87d005 ^
9cce9fab ^




9cce9fab ^


76aee8ea ^
ea87d005 ^
9cce9fab ^
af17562d ^
473daebb ^
9cce9fab ^

473daebb ^
ea87d005 ^
9cce9fab ^
ccbe8b8d ^
9cce9fab ^


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144