-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1211 from abelsromero/issue-1202-remove-deprecate…
…d-from-Document-interface Remove deprecated from Document interface
- Loading branch information
Showing
5 changed files
with
93 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
docs/modules/guides/partials/removal-of-deprecated-asMap-from-builders.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
== Removal of `asMap` from OptionsBuilder and AttributesBuilder | ||
|
||
In v2.5.x it is possible to obtain the backing `Map<String,Object>` for both options and attributes. | ||
|
||
[,java] | ||
.Obtaining backing Map for OptionsBuilder | ||
---- | ||
Map<String, Object> optionsMap = Options.builder() | ||
.backend("html5") | ||
.mkDirs(true) | ||
.safe(SafeMode.UNSAFE) | ||
.asMap(); | ||
---- | ||
|
||
[,java] | ||
.Obtaining backing Map for AttributesBuilder | ||
---- | ||
Map<String, Object> attributesMap = Attributes.builder() | ||
.icons("font") | ||
.sectionNumbers(true) | ||
.asMap(); | ||
---- | ||
|
||
To remove feature duplication and avoid confusion between values in the actual `org.asciidoctor.Attributes` and `org.asciidoctor.Options` and their respective builders, `asMap` it's no longer available in both builders. | ||
|
||
To obtain the backing up, use the `map()` method from the actual `org.asciidoctor.Attributes` and `org.asciidoctor.Options` instances. | ||
|
||
IMPORTANT: `Options::map()` and `Attributes::map()` are marked as deprecated and subject to change at some point, but are still maintained and safe to use in v3.0.x. | ||
|
||
[,java] | ||
.Obtaining backing Map for Options | ||
---- | ||
Options options = Options.builder() | ||
.backend("html5") | ||
.mkDirs(true) | ||
.safe(SafeMode.UNSAFE) | ||
.build(); | ||
Map<String, Object> optionsMap = options.map(); | ||
---- | ||
|
||
[,java] | ||
.Obtaining backing Map for Attributes | ||
---- | ||
Attributes attributes = Attributes.builder() | ||
.icons("font") | ||
.sectionNumbers(true) | ||
.build(); | ||
Map<String, Object> attributesMap = attributes.map(); | ||
---- |
19 changes: 19 additions & 0 deletions
19
docs/modules/guides/partials/removal-of-deprecated-methods-in-document.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
== Removal of deprecated methods in `org.asciidoctor.ast.Document` | ||
|
||
Several methods in `org.asciidoctor.ast.Document` that were marked as `@Deprecated` have been removed. | ||
|
||
For each of the removed methods, the equivalent can be found below. | ||
|
||
[,java] | ||
.Removed deprecated methods | ||
---- | ||
String doctitle() | ||
boolean basebackend(String backend) | ||
---- | ||
|
||
[,java] | ||
.Final methods | ||
---- | ||
String getDoctitle() | ||
boolean isBasebackend(String backend) | ||
---- |