diff --git a/Documentation/Books/Makefile b/Documentation/Books/Makefile index ae34ad906f..40b0e77f70 100644 --- a/Documentation/Books/Makefile +++ b/Documentation/Books/Makefile @@ -31,6 +31,15 @@ book-check-restheader-leftovers: exit 1; \ fi +# Check for all lines starting with exclamation marks, except image links which are exclamation mar + bracket +book-check-mdpp-leftovers: + @if test "`find ppbooks/$(NAME) -name '*.md' -exec grep -- '^![^\[]' {} \; -print | wc -l`" -gt 0; then \ + echo "found these unconverted Markdown-PP tags: "; \ + find ppbooks/$(NAME) -name '*.md' -exec grep '^![^\[]' {} \; -print; \ + exit 1; \ + fi + + book-check-markdown-leftovers: @if test "`find books/$(NAME) -name '*.html' -exec grep -- '##' {} \; -print | wc -l`" -gt 0; then \ echo "found these unconverted markdown titles: "; \ @@ -79,6 +88,7 @@ build-book: make check-summary make book-check-leftover-docublocks make book-check-restheader-leftovers + make book-check-mdpp-leftovers cd ppbooks/$(NAME) && gitbook install cd ppbooks/$(NAME) && gitbook build ./ ./../../books/$(NAME) diff --git a/Documentation/Books/Users/AqlExtending/Conventions.mdpp b/Documentation/Books/Users/AqlExtending/Conventions.mdpp index 9f56af1429..18ddeba2c3 100644 --- a/Documentation/Books/Users/AqlExtending/Conventions.mdpp +++ b/Documentation/Books/Users/AqlExtending/Conventions.mdpp @@ -2,13 +2,13 @@ !SECTION Naming -The *::* symbol is used inside AQL as the namespace separator. Using -the namespace separator, users can create a multi-level hierarchy of +The *::* symbol is used inside AQL as the namespace separator. Using +the namespace separator, users can create a multi-level hierarchy of function groups if required. Examples: -``` js +``` RETURN myfunctions::myfunc() RETURN myfunctions::math::random() @@ -19,17 +19,17 @@ case-insensitive. Built-in AQL functions reside in the namespace *_aql*, which is also the default namespace to look in if an unqualified function name is -found. Adding user functions to the *_aql* namespace is disallowed and +found. Adding user functions to the *_aql* namespace is disallowed and will fail. !SECTION Variables and side effects -User functions can take any number of input arguments and should +User functions can take any number of input arguments and should provide one result. They should be kept purely functional and thus free of -side effects and state, and state modification. +side effects and state, and state modification. Modification of global variables is unsupported, as is changing -the data of any collection from inside an AQL user function. +the data of any collection from inside an AQL user function. User function code is late-bound, and may thus not rely on any variables that existed at the time of declaration. If user function code requires @@ -43,6 +43,7 @@ effects when executing the function. Here is an example that may modify outer scope variables `i` and `name`, making the function **not** side effects-free: + ``` js function (values) { for (i = 0; i < values.length; ++i) { @@ -57,6 +58,7 @@ function (values) { The above function can be made free of side effects by using the `var` keyword, so the variables become function-local variables: + ``` js function (values) { for (var i = 0; i < values.length; ++i) { @@ -74,12 +76,13 @@ function (values) { User functions must only return primitive types (i.e. *null*, boolean values, numeric values, string values) or aggregate types (lists or documents) composed of these types. -Returning any other JavaScript object type from a user function may lead +Returning any other JavaScript object type from a user function may lead to undefined behavior and should be avoided. !SECTION Miscellaneous Internally, user functions are stored in a system collection named *_aqlfunctions*. That means that by default they are excluded from dumps -created with [arangodump](../HttpBulkImports/Arangodump.md). To include AQL user functions in a dump, the -dump should be started with the option *--include-system-collections true*. +created with [arangodump](../HttpBulkImports/Arangodump.md). +To include AQL user functions in a dump, the dump should be started +with the option *--include-system-collections true*. diff --git a/Documentation/Books/Users/General-Graphs/FluentAQLInterface.mdpp b/Documentation/Books/Users/General-Graphs/FluentAQLInterface.mdpp index b95d9a52c1..1d478d4329 100644 --- a/Documentation/Books/Users/General-Graphs/FluentAQLInterface.mdpp +++ b/Documentation/Books/Users/General-Graphs/FluentAQLInterface.mdpp @@ -22,7 +22,7 @@ Therefore you get exactly this two entry points: * Select a set of edges * Select a set of vertices -!SUBSECTION Edges +!SUBSECTION Edges @startDocuBlock JSF_general_graph_edges diff --git a/Documentation/Books/Users/ModuleProcess/README.mdpp b/Documentation/Books/Users/ModuleProcess/README.mdpp index ff916efd0b..797413fbce 100644 --- a/Documentation/Books/Users/ModuleProcess/README.mdpp +++ b/Documentation/Books/Users/ModuleProcess/README.mdpp @@ -8,16 +8,16 @@ env maps the systems environment to an associative array. \ No newline at end of file diff --git a/Documentation/Books/Users/NewFeatures/NewFeatures27.mdpp b/Documentation/Books/Users/NewFeatures/NewFeatures27.mdpp index f83ff29356..0221a19121 100644 --- a/Documentation/Books/Users/NewFeatures/NewFeatures27.mdpp +++ b/Documentation/Books/Users/NewFeatures/NewFeatures27.mdpp @@ -237,8 +237,8 @@ object literals: This is equivalent to the previously available canonical form, which is still available and supported: - -``` + +``` LET name = "Peter" LET age = 42 RETURN { name : name, age : age }