소스 검색

PegMarkdownHighlight: update for GFM table

Le Tan 7 년 전
부모
커밋
ee2d4947be
2개의 변경된 파일558개의 추가작업 그리고 525개의 파일을 삭제
  1. 5 1
      peg-highlight/pmh_definitions.h
  2. 553 524
      peg-highlight/pmh_parser.c

+ 5 - 1
peg-highlight/pmh_definitions.h

@@ -58,6 +58,9 @@ typedef enum
     pmh_DISPLAYFORMULA,     /**< Math display formula */
     pmh_INLINEEQUATION,     /**< Math inline equation */
     pmh_MARK,               /**< HTML <mark> tag content */
+    pmh_TABLE,              /**< GFM table */
+    pmh_TABLEHEADER,        /**< GFM table header */
+    pmh_TABLEBORDER,        /**< GFM table border | */
 
     // Utility types used by the parser itself:
 
@@ -89,7 +92,7 @@ typedef enum
 * \brief Number of types in pmh_element_type.
 * \sa pmh_element_type
 */
-#define pmh_NUM_TYPES 36
+#define pmh_NUM_TYPES 39
 
 /**
 * \brief Number of *language element* types in pmh_element_type.
@@ -129,6 +132,7 @@ enum pmh_extensions
     pmh_EXT_MATH         = (1 << 3),  /**< Math */
     pmh_EXT_MARK         = (1 << 4),  /**< HTML <mark> tag content */
     pmh_EXT_MATH_RAW     = (1 << 5),  /**< Math in format \begin and \end */
+    pmh_EXT_TABLE        = (1 << 6),  /** GFM Table */
 };
 
 #endif

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 553 - 524
peg-highlight/pmh_parser.c


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.