[BACK]Return to mdoc_markdown.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/mdoc_markdown.c between version 1.34 and 1.37

version 1.34, 2020/02/27 01:43:52 version 1.37, 2021/08/10 12:55:03
Line 1 
Line 1 
 /*      $Id$ */  /* $Id$ */
 /*  /*
  * Copyright (c) 2017, 2018, 2020 Ingo Schwarze <schwarze@openbsd.org>   * Copyright (c) 2017, 2018, 2020 Ingo Schwarze <schwarze@openbsd.org>
  *   *
Line 13 
Line 13 
  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN   * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF   * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.   * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    *
    * Markdown formatter for mdoc(7) used by mandoc(1).
  */   */
   #include "config.h"
   
 #include <sys/types.h>  #include <sys/types.h>
   
 #include <assert.h>  #include <assert.h>
Line 29 
Line 33 
 #include "main.h"  #include "main.h"
   
 struct  md_act {  struct  md_act {
         int             (*cond)(struct roff_node *n);          int             (*cond)(struct roff_node *);
         int             (*pre)(struct roff_node *n);          int             (*pre)(struct roff_node *);
         void            (*post)(struct roff_node *n);          void            (*post)(struct roff_node *);
         const char       *prefix; /* pre-node string constant */          const char       *prefix; /* pre-node string constant */
         const char       *suffix; /* post-node string constant */          const char       *suffix; /* post-node string constant */
 };  };
   
 static  void     md_nodelist(struct roff_node *);  static  void     md_nodelist(struct roff_node *);
 static  void     md_node(struct roff_node *);  static  void     md_node(struct roff_node *);
 static  const char *md_stack(char c);  static  const char *md_stack(char);
 static  void     md_preword(void);  static  void     md_preword(void);
 static  void     md_rawword(const char *);  static  void     md_rawword(const char *);
 static  void     md_word(const char *);  static  void     md_word(const char *);
Line 599  md_word(const char *s)
Line 603  md_word(const char *s)
                                 md_rawword("markdown");                                  md_rawword("markdown");
                                 continue;                                  continue;
                         case ESCAPE_FONTBOLD:                          case ESCAPE_FONTBOLD:
                           case ESCAPE_FONTCB:
                                 nextfont = "**";                                  nextfont = "**";
                                 break;                                  break;
                         case ESCAPE_FONTITALIC:                          case ESCAPE_FONTITALIC:
                           case ESCAPE_FONTCI:
                                 nextfont = "*";                                  nextfont = "*";
                                 break;                                  break;
                         case ESCAPE_FONTBI:                          case ESCAPE_FONTBI:
                                 nextfont = "***";                                  nextfont = "***";
                                 break;                                  break;
                         case ESCAPE_FONT:                          case ESCAPE_FONT:
                         case ESCAPE_FONTCW:                          case ESCAPE_FONTCR:
                         case ESCAPE_FONTROMAN:                          case ESCAPE_FONTROMAN:
                                 nextfont = "";                                  nextfont = "";
                                 break;                                  break;

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.37

CVSweb