@@ -2599,8 +2599,6 @@ md_opener_stack(MD_CTX* ctx, int mark_index)
25992599
26002600 case _T ('~' ): return (mark -> end - mark -> beg == 1 ) ? & TILDE_OPENERS_1 : & TILDE_OPENERS_2 ;
26012601
2602- case _T ('|' ): return & PIPE_OPENERS ;
2603-
26042602 case _T ('!' ):
26052603 case _T ('[' ): return & BRACKET_OPENERS ;
26062604
@@ -3858,11 +3856,6 @@ md_analyze_pipe(MD_CTX* ctx, int mark_index)
38583856{
38593857 MD_MARK * mark = & ctx -> marks [mark_index ];
38603858
3861- /* Only 2-char || marks are spoiler delimiters; single | is a table boundary
3862- * or wiki-link separator. */
3863- if (mark -> end - mark -> beg != 2 )
3864- return ;
3865-
38663859 if ((mark -> flags & MD_MARK_POTENTIAL_CLOSER ) && PIPE_OPENERS .top >= 0 ) {
38673860 int opener_index = PIPE_OPENERS .top ;
38683861
@@ -4108,12 +4101,6 @@ md_analyze_marks(MD_CTX* ctx, const MD_LINE* lines, MD_SIZE n_lines,
41084101 case '!' : /* Pass through. */
41094102 case ']' : md_analyze_bracket (ctx , i ); break ;
41104103 case '&' : md_analyze_entity (ctx , i ); break ;
4111- case '|' :
4112- if (ctx -> marks [i ].end - ctx -> marks [i ].beg == 2 )
4113- md_analyze_pipe (ctx , i );
4114- else
4115- md_analyze_table_cell_boundary (ctx , i );
4116- break ;
41174104 case '_' : /* Pass through. */
41184105 case '*' : md_analyze_emph (ctx , i ); break ;
41194106 case '~' : md_analyze_tilde (ctx , i ); break ;
@@ -4138,6 +4125,7 @@ md_analyze_marks(MD_CTX* ctx, const MD_LINE* lines, MD_SIZE n_lines,
41384125static int
41394126md_analyze_inlines (MD_CTX * ctx , const MD_LINE * lines , MD_SIZE n_lines , int table_mode )
41404127{
4128+ int i ;
41414129 int ret ;
41424130
41434131 /* Reset the previously collected stack of marks. */
@@ -4157,7 +4145,12 @@ md_analyze_inlines(MD_CTX* ctx, const MD_LINE* lines, MD_SIZE n_lines, int table
41574145 /* (2) Analyze table cell boundaries. */
41584146 MD_ASSERT (n_lines == 1 );
41594147 ctx -> n_table_cell_boundaries = 0 ;
4160- md_analyze_marks (ctx , lines , n_lines , 0 , ctx -> n_marks , _T ("|" ), 0 );
4148+ for (i = 0 ; i < ctx -> n_marks ; i ++ ) {
4149+ MD_MARK * mark = & ctx -> marks [i ];
4150+ if (!(mark -> flags & MD_MARK_RESOLVED ) &&
4151+ mark -> ch == '|' && mark -> end - mark -> beg == 1 )
4152+ md_analyze_table_cell_boundary (ctx , i );
4153+ }
41614154 return ret ;
41624155 }
41634156
0 commit comments