File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 861861;; https://help.github.com/articles/github-flavored-markdown/#tables
862862
863863(define $table-cell
864- (let ([$cell-str
865- (pdo (cs <- (many1 (<?> (<or> (noneOf (~a space-chars special-chars "| " "\n " ))
866- $escaped-char)
867- "normal char " )))
868- (val <- (return (list->string cs)))
869- (pos <- (getPosition))
870- (setState 'last-$str-pos pos)
871- (setState 'last-$str-val val)
872- (return val))])
864+ (let* ([$cell-str
865+ (pdo (cs <- (many1 (<?> (<or> (noneOf (string-append "| " "\n " ))
866+ $escaped-char)
867+ "normal char " )))
868+ (return (list->string cs)))]
869+ [$cell-inner
870+ (many
871+ (<or>
872+ $whitespace
873+ (unless-strict $smart-punctuation)
874+ $code
875+ $strong
876+ $emph
877+ (unless-strict $footnote-ref)
878+ (parse-unless ignore-inline-links? $link)
879+ $image/inline
880+ (parse-unless ignore-inline-links? $autolink) ;before html
881+ $html/inline
882+ $entity
883+ $special
884+ (pdo
885+ (cs <- (many1 (<or> (noneOf (~a space-chars special-chars "| " "\n " ))
886+ $escaped-char)))
887+ (return (list->string cs)))))])
873888 (pdo
874- (cell <-
875- (many
876- (<or>
877- $cell-str
878- $whitespace
879- (unless-strict $smart-punctuation)
880- $code
881- $strong
882- $emph
883- (unless-strict $footnote-ref)
884- (parse-unless ignore-inline-links? $link)
885- $image/inline
886- (parse-unless ignore-inline-links? $autolink) ;before html
887- $html/inline
888- $entity
889- $special)))
890- (return (let loop ([parts cell]
889+ (cell <- $cell-str)
890+ (return (let loop ([parts (parse-result $cell-inner (open-input-string (string-append cell "\n\n " )))]
891891 [result '() ])
892892 (cond [(empty? parts) (reverse result)]
893893 [(and (string? (first parts))
You can’t perform that action at this time.
0 commit comments