Skip to content

Commit

Permalink
[DOXIA-569] add Markdown sink implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
hboutemy committed Dec 30, 2022
1 parent 24f0066 commit a1ad9b5
Show file tree
Hide file tree
Showing 23 changed files with 1,816 additions and 20 deletions.
2 changes: 1 addition & 1 deletion doxia-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ under the License.
<parent>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia</artifactId>
<version>1.11.2-SNAPSHOT</version>
<version>1.12.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion doxia-logging-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ under the License.
<parent>
<artifactId>doxia</artifactId>
<groupId>org.apache.maven.doxia</groupId>
<version>1.11.2-SNAPSHOT</version>
<version>1.12.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion doxia-modules/doxia-module-apt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ under the License.
<parent>
<artifactId>doxia-modules</artifactId>
<groupId>org.apache.maven.doxia</groupId>
<version>1.11.2-SNAPSHOT</version>
<version>1.12.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion doxia-modules/doxia-module-confluence/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ under the License.
<parent>
<artifactId>doxia-modules</artifactId>
<groupId>org.apache.maven.doxia</groupId>
<version>1.11.2-SNAPSHOT</version>
<version>1.12.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion doxia-modules/doxia-module-docbook-simple/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ under the License.
<parent>
<artifactId>doxia-modules</artifactId>
<groupId>org.apache.maven.doxia</groupId>
<version>1.11.2-SNAPSHOT</version>
<version>1.12.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion doxia-modules/doxia-module-fml/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ under the License.
<parent>
<artifactId>doxia-modules</artifactId>
<groupId>org.apache.maven.doxia</groupId>
<version>1.11.2-SNAPSHOT</version>
<version>1.12.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion doxia-modules/doxia-module-fo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ under the License.
<parent>
<artifactId>doxia-modules</artifactId>
<groupId>org.apache.maven.doxia</groupId>
<version>1.11.2-SNAPSHOT</version>
<version>1.12.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion doxia-modules/doxia-module-itext/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ under the License.
<parent>
<artifactId>doxia-modules</artifactId>
<groupId>org.apache.maven.doxia</groupId>
<version>1.11.2-SNAPSHOT</version>
<version>1.12.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion doxia-modules/doxia-module-latex/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ under the License.
<parent>
<artifactId>doxia-modules</artifactId>
<groupId>org.apache.maven.doxia</groupId>
<version>1.11.2-SNAPSHOT</version>
<version>1.12.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion doxia-modules/doxia-module-markdown/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ under the License.
<parent>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-modules</artifactId>
<version>1.11.2-SNAPSHOT</version>
<version>1.12.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
package org.apache.maven.doxia.module.markdown;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import org.apache.maven.doxia.markup.TextMarkup;
import org.codehaus.plexus.util.StringUtils;

/**
* This interface defines all markups and syntaxes used by the <b>Markdown</b> format.
*/
@SuppressWarnings( "checkstyle:interfaceistype" )
public interface MarkdownMarkup
extends TextMarkup
{
// ----------------------------------------------------------------------
// Markup separators
// ----------------------------------------------------------------------

/** backslash markup char: '\\' */
char BACKSLASH = '\\';

String COMMENT_START = "<!-- ";
String COMMENT_END = " -->";

/** numbering decimal markup char: '1' */
char NUMBERING = '1';

/** numbering lower alpha markup char: 'a' */
char NUMBERING_LOWER_ALPHA_CHAR = 'a';

/** numbering lower roman markup char: 'i' */
char NUMBERING_LOWER_ROMAN_CHAR = 'i';

/** numbering upper alpha markup char: 'A' */
char NUMBERING_UPPER_ALPHA_CHAR = 'A';

/** numbering upper roman markup char: 'I' */
char NUMBERING_UPPER_ROMAN_CHAR = 'I';

/** page break markup char: '\f' */
char PAGE_BREAK = '\f';

// ----------------------------------------------------------------------
// Markup syntax
// ----------------------------------------------------------------------

/** Syntax for the anchor end: "\"></a>" */
String ANCHOR_END_MARKUP = "\"></a>";

/** Syntax for the anchor start: "<a name=\"" */
String ANCHOR_START_MARKUP = "<a name=\"";

/** Syntax for the bold style end: "**" */
String BOLD_END_MARKUP = "**";

/** Syntax for the bold style start: "**" */
String BOLD_START_MARKUP = "**";

/** Syntax for the header start: "---" */
String METADATA_MARKUP = StringUtils.repeat( String.valueOf( MINUS ), 3 );

/** Syntax for the horizontal rule: "========" */
String HORIZONTAL_RULE_MARKUP = StringUtils.repeat( String.valueOf( EQUAL ), 8 );

/** Syntax for the italic style end: "_" */
String ITALIC_END_MARKUP = "_";

/** Syntax for the italic style start: "_" */
String ITALIC_START_MARKUP = "_";

/** Syntax for the link end: ")" */
String LINK_END_MARKUP = ")";

/** Syntax for the link start: "[" */
String LINK_START_1_MARKUP = "[";

/** Syntax for the link start: "](" */
String LINK_START_2_MARKUP = "](";

/** Syntax for the list start: "-" */
String LIST_START_MARKUP = "-";

/** Syntax for the mono-spaced style end: "`" */
String MONOSPACED_END_MARKUP = "`";

/** Syntax for the mono-spaced style start: "`" */
String MONOSPACED_START_MARKUP = "`";

/** Syntax for the non boxed verbatim start: "```" */
String NON_BOXED_VERBATIM_START_MARKUP = "```";

/** Syntax for the non breaking space: "\ " */
String NON_BREAKING_SPACE_MARKUP = String.valueOf( BACKSLASH ) + SPACE;

/** Syntax for the page break: "\f" */
String PAGE_BREAK_MARKUP = String.valueOf( PAGE_BREAK );

/** Syntax for the section title start: "#" */
String SECTION_TITLE_START_MARKUP = "#";

/** Syntax for the table cell start: "|" */
String TABLE_CELL_SEPARATOR_MARKUP = String.valueOf( PIPE );

/** Syntax for the table column, centered style: "---|" */
String TABLE_COL_DEFAULT_ALIGNED_MARKUP = StringUtils.repeat( String.valueOf( MINUS ), 3 ) + PIPE;

/** Syntax for the table column, left style: "---+" */
String TABLE_COL_LEFT_ALIGNED_MARKUP = StringUtils.repeat( String.valueOf( MINUS ), 3 ) + PLUS;

/** Syntax for the table column, right style: "---:" */
String TABLE_COL_RIGHT_ALIGNED_MARKUP = StringUtils.repeat( String.valueOf( MINUS ), 3 ) + COLON;

/** Syntax for the table row end: "|" */
String TABLE_ROW_SEPARATOR_MARKUP = String.valueOf( PIPE );

/** Syntax for the non boxed verbatim end: "```" */
String NON_BOXED_VERBATIM_END_MARKUP = "```";
}

0 comments on commit a1ad9b5

Please sign in to comment.