allow nested backquotes, and allow blocks within backquotes. Reference: /n/atom/patch/applied2013/mkbqnest Date: Sat Sep 7 18:25:05 CES 2013 Signed-off-by: quanstro@quanstro.net --- /sys/src/cmd/mk/lex.c Sat Sep 7 18:24:34 2013 +++ /sys/src/cmd/mk/lex.c Sat Sep 7 18:24:34 2013 @@ -67,7 +67,7 @@ static int bquote(Biobuf *bp, Bufblock *buf) { - int c, line, term; + int c, line, term, depth; int start; line = mkinline; @@ -79,10 +79,13 @@ ; } else term = '`'; /* sh style */ + depth = 1; start = buf->current-buf->start; for(;c > 0; c = nextrune(bp, 0)){ - if(c == term){ + if(term == '}' && c == '{') + depth++; + if(c == term && --depth == 0){ insert(buf, '\n'); insert(buf,0); buf->current = buf->start+start;