Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated 'headerFooter' by 'standalone' #1161

Conversation

abelsromero
Copy link
Member

@abelsromero abelsromero commented Apr 5, 2023

Kind of change

  • Bug fix
  • New non-breaking feature
  • New breaking feature
  • Documentation update
  • Build improvement

Description

What is the goal of this pull request?

Replace deprecated 'headerFooter' by 'standalone'

  • Replace headerFooter methods in OptionsBuild & Options
  • Update referenes to the old methods
  • Added 'standalone' description to docs
    Other changes included:
  • Re-ordered options in docs to follow alphabetical order
  • Remove some unnecessary throws from tests
  • Add missing '@deprecated' to templateDir method

How does it achieve that?

Simply rename method and change the use of the header_footer option in the internal map by standalone.

Are there any alternative ways to implement this?

We could have deprecated the headerFooter method but since this is for v3.0.0...breaking changes are ok.
I'll create a PR to deprecate in v2.5.x

Are there any implications of this pull request? Anything a user must know?
No.

Issue

If this PR fixes an open issue, please add a line of the form:

Fixes #1160

Release notes

Please add a corresponding entry to the file CHANGELOG.adoc

* Replace headerFooter methods in OptionsBuild & Options
* Update referenes to the old methods
* Added 'standalone' description to docs
* Re-ordered options in docs to follow alphabetical order
* Remove some unnecessary throws from tests
* Add missing '@deprecated' to templateDir method

Fixes asciidoctor#1160
public class Options {

public static final String IN_PLACE = "in_place";
public static final String ATTRIBUTES = "attributes";
public static final String HEADER_FOOTER = "header_footer";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we want to at least keep the constant?
Even if the option is not recommended, Asciidoctor itself still handles it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about it, my rationale was that if this is not the recommended way, we should not make it easy to use. Users can still use it as a String if they want, but since we had no references in the current code we could remove it.

We could add it back, I admit I am being very strict with the "let's clean thing now that we can to breaking changes" 😄

@robertpanzer
Copy link
Member

Thank you!

@robertpanzer robertpanzer merged commit f9753cb into asciidoctor:main Apr 7, 2023
@abelsromero abelsromero deleted the issue-1160-replace-headerFooter-with-standalone branch April 21, 2023 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace 'headerFooter' by 'standalone'
2 participants