kwin commented on code in PR #197:
URL: https://github.com/apache/maven-doxia/pull/197#discussion_r1460504261


##########
doxia-modules/doxia-module-markdown/src/main/java/org/apache/maven/doxia/module/markdown/MarkdownSink.java:
##########
@@ -64,56 +66,81 @@ public class MarkdownSink extends AbstractTextSink 
implements MarkdownMarkup {
     /**  linkName. */
     private String linkName;
 
-    /** startFlag. */
-    private boolean startFlag;
-
-    /**  tableCaptionFlag. */
-    private boolean tableCaptionFlag;
-
-    /** tableCellFlag, set to {@code true} inside table (header) cells */
-    private boolean tableCellFlag;
-
-    /** tableRowHeaderFlag, set to {@code true} for table rows containing at 
least one table header cell  */
+    /** tableHeaderCellFlag, set to {@code true} for table rows containing at 
least one table header cell  */
     private boolean tableHeaderCellFlag;
 
-    /**  headerFlag. */
-    private boolean headerFlag;
-
-    /**  bufferFlag, set to {@code true} in certain elements to prevent direct 
writing during {@link #text(String, SinkEventAttributes)} */
-    private boolean bufferFlag;
-
-    /**  verbatimFlag. */
-    private boolean verbatimFlag;
-
-    /** figure flag, set to {@code true} between {@link 
#figure(SinkEventAttributes)} and {@link #figure_()} events */
-    private boolean figureFlag;
-
     /**  number of cells in a table. */
     private int cellCount;
 
-    /**  The writer to use. */
-    private final PrintWriter writer;
-
-    /** {@code true} when last written character in {@link #writer} was a line 
separator, or writer is still at the beginning */
-    private boolean isWriterAtStartOfNewLine;
-
     /**  justification of table cells per column. */
     private List<Integer> cellJustif;
 
     /**  is header row */
     private boolean isFirstTableRow;
 
-    /**  listNestingLevel, 0 outside the list, 1 for the top-level list, 2 for 
a nested list, 3 for a list nested inside a nested list, .... */
-    private int listNestingLevel;
+    /**  The writer to use. */
+    private final PrintWriter writer;
+
+    /** {@code true} when last written character in {@link #writer} was a line 
separator, or writer is still at the beginning */
+    private boolean isWriterAtStartOfNewLine;
 
-    /**  listStyles. */
-    private final Stack<String> listStyles;
+    /** Keep track of end markup for inline events. */
+    protected Queue<Queue<String>> inlineStack = Collections.asLifoQueue(new 
LinkedList<>());
 
-    /** Keep track of the closing tags for inline events. */
-    protected Stack<List<String>> inlineStack = new Stack<>();
+    /** The context of the surrounding elements as stack (LIFO) */
+    protected Queue<ElementContext> elementContextStack = 
Collections.asLifoQueue(new LinkedList<>());

Review Comment:
   It says in its javadoc
   > A more complete and consistent set of LIFO stack operations is provided by 
the [Deque](https://docs.oracle.com/javase/8/docs/api/java/util/Deque.html) 
interface and its implementations, which should be used in preference to this 
class.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to