Merge pull request #42 from grafikrobot/patch-1

Guard against redef of asciidoctor in common b2.
This commit is contained in:
Peter Dimov
2017-10-19 03:02:10 +03:00
committed by GitHub

View File

@@ -9,23 +9,26 @@ import scanner ;
import generators ;
import boostbook ;
# File type
type.register ASCIIDOC : asciidoc adoc ;
# Define dependency scanner
class asciidoc-scanner : common-scanner
if ! [ type.registered ASCIIDOC ]
{
rule pattern ( )
# File type
type.register ASCIIDOC : asciidoc adoc ;
# Define dependency scanner
class asciidoc-scanner : common-scanner
{
return "include::([^[]+)\\[" ;
rule pattern ( )
{
return "include::([^[]+)\\[" ;
}
}
scanner.register asciidoc-scanner : include ;
type.set-scanner ASCIIDOC : asciidoc-scanner ;
}
scanner.register asciidoc-scanner : include ;
type.set-scanner ASCIIDOC : asciidoc-scanner ;
# Define generators
generators.register-standard asciidoctor.asciidoc-to-html : ASCIIDOC : HTML ;