mirror of
https://github.com/janet-lang/janet
synced 2024-11-17 22:24:49 +00:00
Merge pull request #998 from autumnull/master
stop doc-format detecting other modes within code blocks
This commit is contained in:
commit
f741a8e3ff
@ -3146,16 +3146,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 `\`)) (do
|
|
||||||
(++ token-length)
|
|
||||||
(buffer/push token (get line (++ i))))
|
|
||||||
(= b (chr "_")) (delim :underline)
|
|
||||||
(= b (chr "`")) (delim :code)
|
(= b (chr "`")) (delim :code)
|
||||||
(= b (chr "*"))
|
(not (modes :code)) (cond
|
||||||
(if (= (chr "*") (get line (+ i 1)))
|
(= b (chr `\`)) (do
|
||||||
(do (++ i)
|
(++ token-length)
|
||||||
(delim :bold))
|
(buffer/push token (get line (++ i))))
|
||||||
(delim :italics))
|
(= b (chr "_")) (delim :underline)
|
||||||
|
(= b (chr "*"))
|
||||||
|
(if (= (chr "*") (get line (+ i 1)))
|
||||||
|
(do (++ i)
|
||||||
|
(delim :bold))
|
||||||
|
(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