001package org.apache.maven.doxia.module.apt; 002 003/* 004 * Licensed to the Apache Software Foundation (ASF) under one 005 * or more contributor license agreements. See the NOTICE file 006 * distributed with this work for additional information 007 * regarding copyright ownership. The ASF licenses this file 008 * to you under the Apache License, Version 2.0 (the 009 * "License"); you may not use this file except in compliance 010 * with the License. You may obtain a copy of the License at 011 * 012 * http://www.apache.org/licenses/LICENSE-2.0 013 * 014 * Unless required by applicable law or agreed to in writing, 015 * software distributed under the License is distributed on an 016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 017 * KIND, either express or implied. See the License for the 018 * specific language governing permissions and limitations 019 * under the License. 020 */ 021 022import org.apache.maven.doxia.markup.TextMarkup; 023import org.codehaus.plexus.util.StringUtils; 024 025/** 026 * This interface defines all markups and syntaxes used by the <b>APT</b> format. 027 * 028 * @see <a href="https://maven.apache.org/doxia/references/apt-format.html">https://maven.apache.org/doxia/references/apt-format.html</a> 029 * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a> 030 * @since 1.0 031 */ 032@SuppressWarnings( "checkstyle:interfaceistype" ) 033public interface AptMarkup 034 extends TextMarkup 035{ 036 // ---------------------------------------------------------------------- 037 // Markup separators 038 // ---------------------------------------------------------------------- 039 040 /** APT backslash markup char: '\\' */ 041 char BACKSLASH = '\\'; 042 043 /** APT comment markup char: '~' */ 044 char COMMENT = '~'; 045 046 /** APT numbering decimal markup char: '1' */ 047 char NUMBERING = '1'; 048 049 /** APT numbering lower alpha markup char: 'a' */ 050 char NUMBERING_LOWER_ALPHA_CHAR = 'a'; 051 052 /** APT numbering lower roman markup char: 'i' */ 053 char NUMBERING_LOWER_ROMAN_CHAR = 'i'; 054 055 /** APT numbering upper alpha markup char: 'A' */ 056 char NUMBERING_UPPER_ALPHA_CHAR = 'A'; 057 058 /** APT numbering upper roman markup char: 'I' */ 059 char NUMBERING_UPPER_ROMAN_CHAR = 'I'; 060 061 /** APT page break markup char: '\f' */ 062 char PAGE_BREAK = '\f'; 063 064 /** APT percent markup char: '%' */ 065 char PERCENT = '%'; 066 067 /** APT tab markup char: '\t' */ 068 char TAB = '\t'; 069 070 // ---------------------------------------------------------------------- 071 // Markup syntax 072 // ---------------------------------------------------------------------- 073 074 /** Syntax for the anchor end: "}" */ 075 String ANCHOR_END_MARKUP = String.valueOf( RIGHT_CURLY_BRACKET ); 076 077 /** Syntax for the anchor start: "{" */ 078 String ANCHOR_START_MARKUP = String.valueOf( LEFT_CURLY_BRACKET ); 079 080 /** Syntax for the bold style end: ">>" */ 081 String BOLD_END_MARKUP = StringUtils.repeat( String.valueOf( GREATER_THAN ), 2 ); 082 083 /** Syntax for the bold style start: "<<" */ 084 String BOLD_START_MARKUP = StringUtils.repeat( String.valueOf( LESS_THAN ), 2 ); 085 086 /** Syntax for the boxed verbatim start: "+------+" */ 087 String BOXED_VERBATIM_START_MARKUP = PLUS + StringUtils.repeat( String.valueOf( MINUS ), 6 ) + PLUS; 088 089 /** Syntax for the header start: " -----" */ 090 String HEADER_START_MARKUP = SPACE + StringUtils.repeat( String.valueOf( MINUS ), 5 ); 091 092 /** Syntax for the horizontal rule: "========" */ 093 String HORIZONTAL_RULE_MARKUP = StringUtils.repeat( String.valueOf( EQUAL ), 8 ); 094 095 /** Syntax for the italic style end: ">" */ 096 String ITALIC_END_MARKUP = String.valueOf( GREATER_THAN ); 097 098 /** Syntax for the italic style start: "<" */ 099 String ITALIC_START_MARKUP = String.valueOf( LESS_THAN ); 100 101 /** Syntax for the link end: "}}" */ 102 String LINK_END_MARKUP = StringUtils.repeat( String.valueOf( RIGHT_CURLY_BRACKET ), 2 ); 103 104 /** Syntax for the link start: "{{{" */ 105 String LINK_START_1_MARKUP = StringUtils.repeat( String.valueOf( LEFT_CURLY_BRACKET ), 3 ); 106 107 /** Syntax for the link start: "}" */ 108 String LINK_START_2_MARKUP = String.valueOf( RIGHT_CURLY_BRACKET ); 109 110 /** Syntax for the list end: "[]" */ 111 String LIST_END_MARKUP = String.valueOf( LEFT_SQUARE_BRACKET ) + RIGHT_SQUARE_BRACKET; 112 113 /** Syntax for the list start: "*" */ 114 String LIST_START_MARKUP = String.valueOf( STAR ); 115 116 /** Syntax for the mono-spaced style end: ">>>" */ 117 String MONOSPACED_END_MARKUP = StringUtils.repeat( String.valueOf( GREATER_THAN ), 3 ); 118 119 /** Syntax for the mono-spaced style start: "<<<" */ 120 String MONOSPACED_START_MARKUP = StringUtils.repeat( String.valueOf( LESS_THAN ), 3 ); 121 122 /** Syntax for the non boxed verbatim start: "------" */ 123 String NON_BOXED_VERBATIM_START_MARKUP = StringUtils.repeat( String.valueOf( MINUS ), 6 ); 124 125 /** Syntax for the non breaking space: "\ " */ 126 String NON_BREAKING_SPACE_MARKUP = String.valueOf( BACKSLASH ) + SPACE; 127 128 /** Syntax for the page break: "\f" */ 129 String PAGE_BREAK_MARKUP = String.valueOf( PAGE_BREAK ); 130 131 /** Syntax for the section title start: "*" */ 132 String SECTION_TITLE_START_MARKUP = String.valueOf( STAR ); 133 134 /** Syntax for the table cell start: "|" */ 135 String TABLE_CELL_SEPARATOR_MARKUP = String.valueOf( PIPE ); 136 137 /** Syntax for the table column, centered style: "-*" */ 138 String TABLE_COL_CENTERED_ALIGNED_MARKUP = StringUtils.repeat( String.valueOf( MINUS ), 2 ) + STAR; 139 140 /** Syntax for the table column, left style: "-+" */ 141 String TABLE_COL_LEFT_ALIGNED_MARKUP = StringUtils.repeat( String.valueOf( MINUS ), 2 ) + PLUS; 142 143 /** Syntax for the table column, right style: "-:" */ 144 String TABLE_COL_RIGHT_ALIGNED_MARKUP = StringUtils.repeat( String.valueOf( MINUS ), 2 ) + COLON; 145 146 /** Syntax for the table row end: "|" */ 147 String TABLE_ROW_SEPARATOR_MARKUP = String.valueOf( PIPE ); 148 149 /** Syntax for the table row start: "*--" */ 150 String TABLE_ROW_START_MARKUP = STAR + StringUtils.repeat( String.valueOf( MINUS ), 2 ); 151 152 /** Syntax for the boxed verbatim end: "+------+" */ 153 String BOXED_VERBATIM_END_MARKUP = BOXED_VERBATIM_START_MARKUP; 154 155 /** Syntax for the non boxed verbatim end: "------" */ 156 String NON_BOXED_VERBATIM_END_MARKUP = NON_BOXED_VERBATIM_START_MARKUP; 157}