Kaynağa Gözat

count atRowEnd processing

Yuki Takei 2 yıl önce
ebeveyn
işleme
20f10c5fa9

+ 8 - 2
packages/micromark-extension-gfm-table/dev/lib/syntax.js

@@ -274,7 +274,10 @@ function tokenizeTable(effects, ok, nok) {
 
   /** @type {State} */
   function atRowEndHead(code) {
-    console.log('atRowEndHead');
+    let rowEndCount = self.containerState.rowEndCount ?? 0;
+    rowEndCount++;
+    self.containerState.rowEndCount = rowEndCount;
+    console.log({ method: 'atRowEndHead', rowEndCount });
 
     if (code === codes.eof) {
       return nok(code);
@@ -533,7 +536,10 @@ function tokenizeTable(effects, ok, nok) {
 
   /** @type {State} */
   function atRowEndBody(code) {
-    console.log('atRowEndBody');
+    let rowEndCount = self.containerState.rowEndCount ?? 0;
+    rowEndCount++;
+    self.containerState.rowEndCount = rowEndCount;
+    console.log({ method: 'atRowEndBody', rowEndCount });
     effects.exit('tableRow');
 
     if (code === codes.eof) {