diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index fcc0c3c65..c32321bb8 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -37,7 +37,9 @@ Improvement:: * Return Document AST when using convert or convertFile with appropriate options (#1171) (@abelsromero) * Expose Links in the catalog (#1183) (@abelsromero) * BREAKING: Remove deprecated methods in Options, OptionsBuilder, Attributes & AttributesBuilder (#1199) (@abelsromero) -* BREAKING: Remove deprecated Asciidoctor interface (#1201) (@abelsromero) +* BREAKING: Remove deprecated methods from Asciidoctor interface (#1201) (@abelsromero) +* BREAKING: Remove deprecated methods from Document interface (#1202) (@abelsromero) +* BREAKING: Remove deprecated methods and constants from extension package (#1203) (@abelsromero) Bug Fixes:: diff --git a/asciidoctorj-api/src/main/java/org/asciidoctor/extension/BlockProcessor.java b/asciidoctorj-api/src/main/java/org/asciidoctor/extension/BlockProcessor.java index e8b09d811..61d6fadf8 100644 --- a/asciidoctorj-api/src/main/java/org/asciidoctor/extension/BlockProcessor.java +++ b/asciidoctorj-api/src/main/java/org/asciidoctor/extension/BlockProcessor.java @@ -7,151 +7,6 @@ public abstract class BlockProcessor extends BaseProcessor { - /** - * This value is used as the config option key when defining the block type - * a Processor should process. - * Its value must be a list of String constants: - * - *
Example to make a BlockProcessor work on listings and examples named foo: - *
- *- * - * - * @deprecated Please use {@link Contexts#KEY} - */ - @Deprecated - public static final String CONTEXTS = "contexts"; - - /** - * Predefined constant for making a BlockProcessor work on open blocks. - * When passed with the {@link #CONTEXTS} config option this BlockProcessor works on open blocks: - *- * Map<String, Object> config = new HashMap<>(); - * config.put(CONTEXTS, Arrays.asList(EXAMPLE, LISTING)); - * BlockProcessor blockProcessor = new BlockProcessor("foo", config); - * asciidoctor.javaExtensionRegistry().block(blockProcessor); - * - *
- * [foo] - * -- - * An open block can be an anonymous container, - * or it can masquerade as any other block. - * -- - *- * - * @deprecated Please use {@link Contexts#OPEN} - */ - @Deprecated - public static final String CONTEXT_OPEN = ":open"; - - /** - * Predefined constant for making a BlockProcessor work on example blocks. - * When passed with the {@link #CONTEXTS} config option this BlockProcessor works on example blocks: - *
- * [foo] - * ==== - * This is just a neat example. - * ==== - *- * - * @deprecated Please use {@link Contexts#EXAMPLE} - */ - @Deprecated - public static final String CONTEXT_EXAMPLE = ":example"; - - /** - * Predefined constant for making a BlockProcessor work on sidebar blocks. - * When passed with the {@link #CONTEXTS} config option this BlockProcessor works on sidebar blocks: - *
- * [foo] - * **** - * This is just a sidebar. - * **** - *- * - * @deprecated Please use {@link Contexts#SIDEBAR} - */ - @Deprecated - public static final String CONTEXT_SIDEBAR = ":sidebar"; - - /** - * Predefined constant for making a BlockProcessor work on literal blocks. - * When passed with the {@link #CONTEXTS} config option this BlockProcessor works on literal blocks: - *
- * [foo] - * .... - * This is just a literal block. - * .... - *- * - * @deprecated Please use {@link Contexts#LITERAL} - */ - @Deprecated - public static final String CONTEXT_LITERAL = ":literal"; - - /** - * Predefined constant for making a BlockProcessor work on source blocks. - * When passed with the {@link #CONTEXTS} config option this BlockProcessor works on source blocks: - *
- * [foo] - * .... - * This is just a literal block. - * .... - *- * - * @deprecated Please use {@link Contexts#LISTING} - */ - @Deprecated - public static final String CONTEXT_LISTING = ":listing"; - - /** - * Predefined constant for making a BlockProcessor work on quote blocks. - * When passed with the {@link #CONTEXTS} config option this BlockProcessor works on quote blocks: - *
- * [foo] - * ____ - * To be or not to be... - * ____ - *- * - * @deprecated Please use {@link Contexts#QUOTE} - */ - @Deprecated - public static final String CONTEXT_QUOTE = ":quote"; - - /** - * Predefined constant for making a BlockProcessor work on passthrough blocks. - * When passed with the {@link #CONTEXTS} config option this BlockProcessor works on passthrough blocks: - * - *
- * [foo] - * ++++ - * <h1>Big text</h1> - * ++++ - *- * - * @deprecated Please use {@link Contexts#PASS} - */ - @Deprecated - public static final String CONTEXT_PASS = ":pass"; - - /** - * Predefined constant for making a BlockProcessor work on paragraph blocks. - * This is also the default for the {@link #CONTEXTS} config option if no other context is given. - * When passed with the {@link #CONTEXTS} config option this BlockProcessor works on paragraph blocks: - * - *
- * [foo] - * Please process this paragraph. - * - * And don't process this. - *- * - * @deprecated Please use {@link Contexts#PARAGRAPH} - */ - @Deprecated - public static final String CONTEXT_PARAGRAPH = ":paragraph"; - protected String name; public BlockProcessor() { diff --git a/asciidoctorj-api/src/main/java/org/asciidoctor/extension/PreprocessorReader.java b/asciidoctorj-api/src/main/java/org/asciidoctor/extension/PreprocessorReader.java index def925daa..bb4642a15 100644 --- a/asciidoctorj-api/src/main/java/org/asciidoctor/extension/PreprocessorReader.java +++ b/asciidoctorj-api/src/main/java/org/asciidoctor/extension/PreprocessorReader.java @@ -9,42 +9,17 @@ public interface PreprocessorReader extends Reader { /** * Push source content onto the front of the reader and switch the context * based on the file, document-relative path and line information given. - * This method is typically used in an {@link IncludeProcessor} to add content - * read from the target specified. - * - * @deprecated Use {@link #pushInclude(String, String, String, int, Map)} instead. - * - * @param data content to push - * @param file representation of name of the included file. Does not need to exists - * @param path representation of path of the included file. Does not need to exists - * @param lineNumber line number of the first line of the included content - * @param attributes additional attributes to pass - */ - @Deprecated - void push_include(String data, String file, String path, int lineNumber, Map
* This method Does not consume the line from the stack.
*
* @return True if the there are no more lines or if the next line is empty
@@ -73,15 +64,8 @@ public interface Reader {
*
* @return the String of the next line of the source data if data is present or
* nulll if there is no more data.
- */
- String readLine();
-
- /**
- * @return A copy of the String List of lines remaining in this Reader
- * @deprecated Use {@link #getLines()}
*/
- @Deprecated
- List
* Since this line was (assumed to be) previously retrieved through the
* reader, it is marked as seen.
*/
@@ -98,7 +82,7 @@ public interface Reader {
/**
* Push multiple lines onto the beginning of the Array of source data.
- *
+ *
* Since this lines were (assumed to be) previously retrieved through the
* reader, they are marked as seen.
*/
@@ -107,7 +91,7 @@ public interface Reader {
/**
* Peek at the next line of source data. Processes the line, if not
* already marked as processed, but does not consume it.
- *
+ *
* This method will probe the reader for more lines.
*/
String peekLine();
@@ -130,7 +114,6 @@ public interface Reader {
boolean advance();
/**
- *
* Public: Advance to the end of the reader, consuming all remaining lines
*/
void terminate();
diff --git a/asciidoctorj-core/src/main/java/org/asciidoctor/jruby/extension/internal/PreprocessorReaderImpl.java b/asciidoctorj-core/src/main/java/org/asciidoctor/jruby/extension/internal/PreprocessorReaderImpl.java
index 1f1edc747..2939f8bc5 100644
--- a/asciidoctorj-core/src/main/java/org/asciidoctor/jruby/extension/internal/PreprocessorReaderImpl.java
+++ b/asciidoctorj-core/src/main/java/org/asciidoctor/jruby/extension/internal/PreprocessorReaderImpl.java
@@ -14,11 +14,6 @@ public PreprocessorReaderImpl(IRubyObject rubyNode) {
super(rubyNode);
}
- @Override
- public void push_include(String data, String file, String path, int lineNumber, Map");
diff --git a/asciidoctorj-core/src/test/java/org/asciidoctor/extension/PositionalAttrsIncludeProcessor.java b/asciidoctorj-core/src/test/java/org/asciidoctor/extension/PositionalAttrsIncludeProcessor.java
index 71244d6c2..c68a1d808 100644
--- a/asciidoctorj-core/src/test/java/org/asciidoctor/extension/PositionalAttrsIncludeProcessor.java
+++ b/asciidoctorj-core/src/test/java/org/asciidoctor/extension/PositionalAttrsIncludeProcessor.java
@@ -32,7 +32,7 @@ public void process(Document document, PreprocessorReader reader, String target,
str += "," + it.next().getValue();
}
- reader.push_include(str, target, target, 1, attributes);
+ reader.pushInclude(str, target, target, 1, attributes);
}
diff --git a/asciidoctorj-core/src/test/java/org/asciidoctor/extension/UriIncludeProcessor.java b/asciidoctorj-core/src/test/java/org/asciidoctor/extension/UriIncludeProcessor.java
index e282595f4..d2d6e18e8 100644
--- a/asciidoctorj-core/src/test/java/org/asciidoctor/extension/UriIncludeProcessor.java
+++ b/asciidoctorj-core/src/test/java/org/asciidoctor/extension/UriIncludeProcessor.java
@@ -29,7 +29,7 @@ public void process(Document document, PreprocessorReader reader, String target,
Map