 : parse-farkup ( string -- string' )
     farkup parse parse-result-ast
     [ [ dup string? [ write ] [ drop ] if ] deep-each ] with-string-writer ;
-
-! paragraph
-    ! [
-        ! line ,
-        ! "\n" token ,
-    ! ] choice* repeat1

            [ any-char , "}]" token hide , ] seq* optional [ >string ] action ,
        ] seq* [ concat ] action ,
    ] seq* [ first2 swap render-code ] action ;

MEMO: table-column ( -- parser ) [ "|" token text ] seq* ;
MEMO: table-row ( -- parser ) [ ] seq* ; 
MEMO: table ( -- parser ) [ "[" ] seq* ;

MEMO: line ( -- parser )
    [

    [ dup delimiters member? swap CHAR: \n = not and ] satisfy
    [ 1string ] action ;

: surround-with-foo ( string tag -- seq )
    dup <foo> swap </foo> swapd 3array ;

: delimited ( str html -- parser )
    [
        over token hide ,
        text [ surround-with-foo ] swapd curry action ,
        token hide ,
    ] seq* ;

