201
201
readexpr! (state) = readexpr! (state, first (popfirst! (state. s)) + 1 )
202
202
203
203
function skipwhitespace! (state:: State )
204
- while isnextchar (state, (' ' , ' \t ' , ' \n ' ))
204
+ while isnextchar (state, (' ' , ' \t ' , ' \n ' , ' \r ' ))
205
205
popfirst! (state. s)
206
206
end
207
207
end
@@ -254,7 +254,7 @@ function read_annotation!(state::State, i::Int, char::Char, newstyles)
254
254
true
255
255
elseif nextchar == ' :'
256
256
true
257
- elseif nextchar ∈ (' ' , ' \t ' , ' \n ' )
257
+ elseif nextchar ∈ (' ' , ' \t ' , ' \n ' , ' \r ' )
258
258
skipwhitespace! (state)
259
259
true
260
260
else
@@ -272,7 +272,7 @@ function read_inlineface!(state::State, i::Int, char::Char, newstyles)
272
272
end
273
273
function readsymbol! (state, lastchar)
274
274
Iterators. takewhile (
275
- c -> (lastchar = last (c)) ∉ (' ' , ' \t ' , ' \n ' , ' ,' , ' )' ), state. s) |>
275
+ c -> (lastchar = last (c)) ∉ (' ' , ' \t ' , ' \n ' , ' \r ' , ' ,' , ' )' ), state. s) |>
276
276
collect .| > last |> String, lastchar
277
277
end
278
278
function parsecolor (color:: String )
@@ -286,7 +286,7 @@ function read_inlineface!(state::State, i::Int, char::Char, newstyles)
286
286
end
287
287
end
288
288
function nextnonwhitespace! (state, lastchar)
289
- if lastchar ∈ (' ' , ' \t ' , ' \n ' )
289
+ if lastchar ∈ (' ' , ' \t ' , ' \n ' , ' \r ' )
290
290
skipwhitespace! (state)
291
291
_, lastchar = popfirst! (state. s)
292
292
end
@@ -571,9 +571,7 @@ function read_face_or_keyval!(state::State, i::Int, char::Char, newstyles)
571
571
if isempty (state. s)
572
572
elseif last (peek (state. s)) == ' ='
573
573
popfirst! (state. s)
574
- if isnextchar (state, (' ' , ' \t ' , ' \n ' ))
575
- skipwhitespace! (state)
576
- end
574
+ skipwhitespace! (state)
577
575
nextchar = if ! isempty (state. s) last (peek (state. s)) else ' \0 ' end
578
576
value = if isempty (state. s) " "
579
577
elseif nextchar == ' {'
@@ -610,7 +608,7 @@ function read_face_or_keyval!(state::State, i::Int, char::Char, newstyles)
610
608
Pair {Symbol, Any} (:face , Symbol (key))
611
609
end ))
612
610
end
613
- if isempty (state. s) || last (peek (state. s)) ∉ (' ' , ' \t ' , ' \n ' , ' ,' , ' :' )
611
+ if isempty (state. s) || last (peek (state. s)) ∉ (' ' , ' \t ' , ' \n ' , ' \r ' , ' ,' , ' :' )
614
612
styerr! (state, " Incomplete annotation declaration" , prevind (state. content, i), " starts here" )
615
613
end
616
614
end
0 commit comments