I am generating a PDF with source code, using the AsciiDoc syntax
[source,terminal]
----
Long terminal input and output here
----
When the block uses more than one page (in A4 PDF), there is no problem: the source code starts without a page break.

Source code
Ejecuto el comando de finalizaci贸n
[source,terminal]
----
$ git flow hotfix finish -F -p 0.1.1
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
Merge made by the 'recursive' strategy.
.gitignore | 1 +
version.txt | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 .gitignore
Switched to branch 'develop'
Your branch is up-to-date with 'origin/develop'.
Merge made by the 'recursive' strategy.
.gitignore | 1 +
version.txt | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 .gitignore
To https://[email protected]/amieiro/git_flow.git
- [deleted] hotfix/0.1.1
Deleted branch hotfix/0.1.1 (was a025ade).
Counting objects: 8, done.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (6/6), 628 bytes | 0 bytes/s, done.
Total 6 (delta 1), reused 0 (delta 0)
remote:
remote: Create pull request for develop:
remote: https://bitbucket.org/amieiro/git_flow/pull-requests/new?source=develop&t=1
remote:
To https://[email protected]/amieiro/git_flow.git
a325e19..4a3ddb4 develop -> develop
Total 0 (delta 0), reused 0 (delta 0)
To https://[email protected]/amieiro/git_flow.git
f18cd9c..90794fa master -> master
Counting objects: 2, done.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 285 bytes | 0 bytes/s, done.
Total 2 (delta 0), reused 0 (delta 0)
To https://[email protected]/amieiro/git_flow.git
* [new tag] 0.1.0 -> 0.1.0
* [new tag] 0.1.1 -> 0.1.1
Summary of actions:
- Latest objects have been fetched from 'origin'
- Hotfix branch 'hotfix/0.1.1' has been merged into 'master'
- The hotfix was tagged '0.1.1'
- Hotfix tag '0.1.1' has been back-merged into 'develop'
- Hotfix branch 'hotfix/0.1.1' has been locally deleted; it has been remotely deleted from 'origin'
- 'develop', 'master' and tags have been pushed to 'origin'
- You are now on branch 'develop'
----
But when the block doesn't fit in the current page and doesn't occupy more than one page (A4 PDF), the block starts on the next page, leaving an annoying blank space. You can see two examples and the white space is emphasized in yellow :

Source code
==== git flow feature finish
Tras acabar el desarrollo de la __feature__, la cierro, usando el comando:
[source,terminal]
----
$ git flow feature finish licenciaAdd
Switched to branch 'develop'
Your branch is up-to-date with 'origin/develop'.
Updating a98e02a..e2d68d0
Fast-forward
licencia.txt | 2 ++
1 file changed, 2 insertions(+)
create mode 100644 licencia.txt
To https://[email protected]/amieiro/git_flow.git
- [deleted] feature/licenciaAdd
Deleted branch feature/licenciaAdd (was e2d68d0).
Summary of actions:
- The feature branch 'feature/licenciaAdd' was merged into 'develop'
- Feature branch 'feature/licenciaAdd' has been locally deleted; it has been remotely deleted from 'origin'
- You are now on branch 'develop'
----

Source code
En el archivo de configuraci贸n de Git puedo ver las entradas de git-flow
[source,terminal]
----
$ cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = https://github.com/jquery/jquery.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[gitflow "branch"]
master = master
develop = develop
[gitflow "prefix"]
feature = feature/
release = release/
hotfix = hotfix/
support = support/
versiontag =
----
<<<<
Is there some parameter or option that I can use to avoid the white space before the source code block and splits the block into two pages?
This space is introduced intentionally as part of the keep together / unbreakable logic. The block is moved to a new page if it can fit on one page. If it can't fit on a single page, there's no need to bother moving it and instead it's just split.
We need a way to disable this behavior globally and per block. This is roughly the same request that is in #240.
I'm going to change the title to reflect that actual request.
Hi!
Is there any update to this request? I'm in the same situation as @amieiro .
Thanks!
This is not my focus right now. I am accepting contributions, though, which should be simpler now that project has a full test suite.
@amieiro @mariacodicesoftware I'm running into this as well. Did any of you find a workaround maybe?
Yes, I have a solution and I'm working on implementing it for the 2.0.0 release.
Most helpful comment
Yes, I have a solution and I'm working on implementing it for the 2.0.0 release.