1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 */ 19 package org.apache.maven.doxia.module.markdown; 20 21 import org.apache.maven.doxia.markup.TextMarkup; 22 import org.codehaus.plexus.util.StringUtils; 23 24 /** 25 * This interface defines all markups and syntaxes used by the <b>Markdown</b> format. 26 */ 27 @SuppressWarnings("checkstyle:interfaceistype") 28 public interface MarkdownMarkup extends TextMarkup { 29 // ---------------------------------------------------------------------- 30 // Markup separators 31 // ---------------------------------------------------------------------- 32 33 /** backslash markup char: '\\' */ 34 char BACKSLASH = '\\'; 35 36 String COMMENT_START = "<!-- "; 37 String COMMENT_END = " -->"; 38 39 String BLANK_LINE = EOL + EOL; 40 41 // ---------------------------------------------------------------------- 42 // Markup syntax 43 // ---------------------------------------------------------------------- 44 45 /** Syntax for the anchor end: "\"></a>" */ 46 String ANCHOR_END_MARKUP = "\"></a>"; 47 48 /** Syntax for the anchor start: "<a id=\"" */ 49 String ANCHOR_START_MARKUP = "<a id=\""; 50 51 /** Syntax for the bold style end: "**" */ 52 String BOLD_END_MARKUP = "**"; 53 54 /** Syntax for the bold style start: "**" */ 55 String BOLD_START_MARKUP = "**"; 56 57 /** Syntax for the header start: "---" */ 58 String METADATA_MARKUP = StringUtils.repeat(String.valueOf(MINUS), 3); 59 60 /** Syntax for the horizontal rule: "***" */ 61 String HORIZONTAL_RULE_MARKUP = "***"; 62 63 /** Syntax for the italic style end: "_" */ 64 String ITALIC_END_MARKUP = "_"; 65 66 /** Syntax for the italic style start: "_" */ 67 String ITALIC_START_MARKUP = "_"; 68 69 /** Syntax for the link end: ")" */ 70 String LINK_END_MARKUP = ")"; 71 72 /** Syntax for the link start: "[" */ 73 String LINK_START_1_MARKUP = "["; 74 75 /** Syntax for the link start: "](" */ 76 String LINK_START_2_MARKUP = "]("; 77 78 /** Syntax for the ordered list item: '1.' */ 79 String LIST_ORDERED_ITEM_START_MARKUP = "1."; 80 81 /** Syntax for the unordered list item: "-" */ 82 String LIST_UNORDERED_ITEM_START_MARKUP = "-"; 83 84 /** Syntax for the mono-spaced style end: "`" */ 85 String MONOSPACED_END_MARKUP = "`"; 86 87 /** Syntax for the mono-spaced style start: "`" */ 88 String MONOSPACED_START_MARKUP = "`"; 89 90 /** Syntax for the verbatim start: "```" */ 91 String VERBATIM_START_MARKUP = "```"; 92 93 /** Syntax for the non breaking space: entity from HTML */ 94 String NON_BREAKING_SPACE_MARKUP = " "; 95 96 /** Syntax for the section title start: "#" */ 97 String SECTION_TITLE_START_MARKUP = "#"; 98 99 /** Syntax for the table cell start: "|" */ 100 String TABLE_CELL_SEPARATOR_MARKUP = String.valueOf(PIPE); 101 102 /** Syntax for the table column, centered style: "---|" */ 103 String TABLE_COL_DEFAULT_ALIGNED_MARKUP = StringUtils.repeat(String.valueOf(MINUS), 3) + PIPE; 104 105 /** Syntax for the table column, left style: "---+" */ 106 String TABLE_COL_LEFT_ALIGNED_MARKUP = StringUtils.repeat(String.valueOf(MINUS), 3) + PLUS; 107 108 /** Syntax for the table column, right style: "---:" */ 109 String TABLE_COL_RIGHT_ALIGNED_MARKUP = StringUtils.repeat(String.valueOf(MINUS), 3) + COLON; 110 111 /** Syntax for the table row end: "|" */ 112 String TABLE_ROW_SEPARATOR_MARKUP = String.valueOf(PIPE); 113 114 /** Syntax for the verbatim end: "```" */ 115 String VERBATIM_END_MARKUP = "```"; 116 }