mirror of
https://github.com/janet-lang/janet
synced 2024-12-25 07:50:27 +00:00
doc-format no longer detects other modes within code blocks
This commit is contained in:
parent
e001efa9fd
commit
1f41b6c138
@ -3141,16 +3141,18 @@
|
|||||||
(def b (get line i))
|
(def b (get line i))
|
||||||
(cond
|
(cond
|
||||||
(or (= b (chr "\n")) (= b (chr " "))) (endtoken)
|
(or (= b (chr "\n")) (= b (chr " "))) (endtoken)
|
||||||
|
(= b (chr "`")) (delim :code)
|
||||||
|
(not (modes :code)) (cond
|
||||||
(= b (chr `\`)) (do
|
(= b (chr `\`)) (do
|
||||||
(++ token-length)
|
(++ token-length)
|
||||||
(buffer/push token (get line (++ i))))
|
(buffer/push token (get line (++ i))))
|
||||||
(= b (chr "_")) (delim :underline)
|
(= b (chr "_")) (delim :underline)
|
||||||
(= b (chr "`")) (delim :code)
|
|
||||||
(= b (chr "*"))
|
(= b (chr "*"))
|
||||||
(if (= (chr "*") (get line (+ i 1)))
|
(if (= (chr "*") (get line (+ i 1)))
|
||||||
(do (++ i)
|
(do (++ i)
|
||||||
(delim :bold))
|
(delim :bold))
|
||||||
(delim :italics))
|
(delim :italics))
|
||||||
|
(do (++ token-length) (buffer/push token b)))
|
||||||
(do (++ token-length) (buffer/push token b))))
|
(do (++ token-length) (buffer/push token b))))
|
||||||
(endtoken)
|
(endtoken)
|
||||||
(tuple/slice tokens))
|
(tuple/slice tokens))
|
||||||
|
Loading…
Reference in New Issue
Block a user