michael-o commented on code in PR #114: URL: https://github.com/apache/maven-doxia/pull/114#discussion_r938215528
########## doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/Xhtml5BaseSink.java: ########## @@ -1621,29 +1503,6 @@ private void tableCell( boolean headerRow, MutableAttributeSet attributes ) { Tag t = ( headerRow ? HtmlMarkup.TH : HtmlMarkup.TD ); - if ( !headerRow && cellCountStack != null && !cellCountStack.isEmpty() - && cellJustifStack != null && !cellJustifStack.isEmpty() && getCellJustif() != null ) - { - int cellCount = getCellCount(); - if ( cellCount < getCellJustif().length ) - { - Map<Integer, MutableAttributeSet> hash = new HashMap<>(); - hash.put( Sink.JUSTIFY_CENTER, SinkEventAttributeSet.CENTER ); - hash.put( Sink.JUSTIFY_LEFT, SinkEventAttributeSet.LEFT ); - hash.put( Sink.JUSTIFY_RIGHT, SinkEventAttributeSet.RIGHT ); - MutableAttributeSet atts = hash.get( getCellJustif()[cellCount] ); Review Comment: This can be converted to CSS classes... during parsing this is retained... ########## doxia-core/src/main/java/org/apache/maven/doxia/parser/Xhtml5BaseParser.java: ########## @@ -1218,26 +1212,13 @@ private void handleSectionEnd( Sink sink ) private void handleTableStart( Sink sink, SinkEventAttributeSet attribs, XmlPullParser parser ) { sink.table( attribs ); - String border = parser.getAttributeValue( null, Attribute.BORDER.toString() ); - boolean grid = true; - - if ( border == null || "0".equals( border ) ) + String givenTableClass = parser.getAttributeValue( null, Attribute.CLASS.toString() ); + boolean grid = false; + if ( givenTableClass != null && BODYTABLEBORDER_CLASS_PATTERN.matcher( givenTableClass ).matches() ) { - grid = false; + grid = true; } - - String align = parser.getAttributeValue( null, Attribute.ALIGN.toString() ); - int[] justif = {Sink.JUSTIFY_LEFT}; - - if ( "center".equals( align ) ) - { - justif[0] = Sink.JUSTIFY_CENTER; - } - else if ( "right".equals( align ) ) - { - justif[0] = Sink.JUSTIFY_RIGHT; - } - - sink.tableRows( justif, grid ); Review Comment: This could be a fixed, pregiven CSS class name, but then it does not make sense to parse because it will be passed through. -- 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