import convert from '../../utils/parser'


export interface MdNodeAttr {
  href?: string;
}

export interface MdNode {
  child?: MdNode[];
  type?: "tag" | "text";
  tag?: "navigator" | "p" | "view";
  attr?: MdNodeAttr;
  text?: string;
}
export interface Md {
  theme?: string;
  child?: MdNode[];
}

export function parse(content?: string): Md {
  return convert(content || '', 'markdown');
}
