Skip to content

Commit

Permalink
prepended config via plugin shouldn't add blank line that breaks docu…
Browse files Browse the repository at this point in the history
…ment title (#325)
  • Loading branch information
ahus1 committed Sep 6, 2019
1 parent 29e5339 commit 2bbc692
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This document provides a high-level view of the changes introduced by release.
=== 0.30.3 (work in progress)

- support operation block macro in https://docs.spring.io/spring-restdocs/docs/current/reference/html5/[spring-restdoc] and auto-detect the snippets folder (#312)
- prepended config via plugin shouldn't add blank line that breaks document title (#325)

=== 0.30.2 (preview, available from Github releases)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ public class PrependConfig extends Preprocessor {

@Override
public void process(Document document, PreprocessorReader reader) {
reader.restoreLines(Arrays.asList(config.split("\n")));
if (config.length() != 0) {
// otherwise an empty line at the beginning breaks level 0 detection
reader.restoreLines(Arrays.asList(config.split("\n")));
}
}

public void setConfig(String config) {
Expand Down

0 comments on commit 2bbc692

Please sign in to comment.