Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
guidotack committed Nov 16, 2016
2 parents 34fca98 + b3c588a commit bf8d2d2
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 1 deletion.
15 changes: 15 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,21 @@ if (BUILD_HTML_DOCUMENTATION)
INSTALL(DIRECTORY ${PROJECT_BINARY_DIR}/doc/html DESTINATION doc)
endif()

option (BUILD_HTML_DOCUMENTATION_JEKYLL "Build HTML documentation for the MiniZinc library" OFF)

if (BUILD_HTML_DOCUMENTATION_JEKYLL)
add_custom_target(doc ALL
DEPENDS "mzn2doc"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMAND mzn2doc --toplevel-groups 2
--include-stdlib
--html-header ${PROJECT_SOURCE_DIR}/doc/html/header_jekyll.html
--html-footer ${PROJECT_SOURCE_DIR}/doc/html/footer_jekyll.html
--output-base ${PROJECT_BINARY_DIR}/doc/html/doc share/minizinc/std/globals.mzn
)
INSTALL(DIRECTORY ${PROJECT_BINARY_DIR}/doc/html DESTINATION doc)
endif()

option (BUILD_PDF_DOCUMENTATION "Build PDF documentation for the MiniZinc language" OFF)

if (BUILD_PDF_DOCUMENTATION)
Expand Down
4 changes: 4 additions & 0 deletions doc/html/footer_jekyll.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{% endraw %}
</div>
</div>
</div>
36 changes: 36 additions & 0 deletions doc/html/header_jekyll.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
layout: minizinc
title: "MiniZinc - Standard Library - @TITLE"
---

<script type='text/javascript' src='http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js'></script>
<script type='text/javascript'>
function revealMore(anchor) {
morecode = jQuery( anchor ).parent().parent().find('div.mzn-fundecl-more-code');
morecode.toggleClass('mzn-fundecl-reveal-code');
if (morecode.hasClass('mzn-fundecl-reveal-code')) {
jQuery(anchor).html('&#9660;');
jQuery(anchor).parent().parent().find('span.mzn-fundecl-equals').addClass('mzn-fundecl-reveal-equals');
} else {
jQuery(anchor).html('&#9664;');
jQuery(anchor).parent().parent().find('span.mzn-fundecl-equals').removeClass('mzn-fundecl-reveal-equals');
}
}
function revealAll() { jQuery('a.mzn-fundecl-more').html('&#9660;');
jQuery('div.mzn-fundecl-more-code').addClass('mzn-fundecl-reveal-code');
jQuery('span.mzn-fundecl-equals').addClass('mzn-fundecl-reveal-equals');
}
function hideAll() {
jQuery('a.mzn-fundecl-more').html('&#9664;');
jQuery('div.mzn-fundecl-more-code').removeClass('mzn-fundecl-reveal-code');
jQuery('span.mzn-fundecl-equals').removeClass('mzn-fundecl-reveal-equals');
}
</script>

<div class="container">

<div class="row">
<div class="col-lg-12">
<h1 class='page-header'>MiniZinc Documentation - Standard Library</h1>
{% raw %}
2 changes: 1 addition & 1 deletion lib/typecheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ namespace MiniZinc {
if (vi->type().st() != ty.st()) {
throw TypeError(_env,al.loc(),"non-uniform array literal");
}
if (ty.enumId() != vi->type().enumId()) {
if (vi->type().enumId() != 0 && ty.enumId() != vi->type().enumId()) {
ty.enumId(0);
}
} else {
Expand Down

0 comments on commit bf8d2d2

Please sign in to comment.