diff -ur v29/ezmd.py v30/ezmd.py --- v29/ezmd.py 2019-10-12 01:02:02.000000000 +0900 +++ v30/ezmd.py 2019-10-12 11:36:46.000000000 +0900 @@ -351,7 +351,6 @@ return sol def do_mode_ul(buf): - buf = list( map(rm_nl, buf) ) buf = list( filter( lambda s: s.strip(), buf ) ) buf = list( map(idt_cnt, buf) ) # (i, s) @@ -451,7 +450,6 @@ tbl_prop = { 'border': 1, 'cellspacing': 0 } def do_tbl_org(buf): - buf = list( map(rm_nl, buf) ) buf = lst_strip(buf) buf = cut_empty(buf) if buf: @@ -702,10 +700,21 @@ return yaml.dump( o, default_flow_style=False, allow_unicode=True, encoding='utf-8' ) +def rm_nl_tag(o): + if is_str(o): + return rm_nl(o) + if is_lst(o): + return list( map(rm_nl_tag, o) ) + # o is tag + if o.name != 'pre': + o.v = rm_nl_tag(o.v) + return o + def s_to_tag_lst(s): lst = pre_split_esc_join(s, '\n') lst = list( map( strip_tail, lst ) ) lst = ezmd(lst) + lst = list( map( rm_nl_tag, lst) ) return lst if __name__ == "__main__":