1
0
Fork 0

Add checker for MarkdownPP failures; fix existing failures (fixes #1497)

MarkdownPP fails on broken ``` code sections.
This commit is contained in:
Wilfried Goesgens 2015-09-17 17:26:01 +02:00
parent 90aab26866
commit 17f1b316dd
5 changed files with 32 additions and 19 deletions

View File

@ -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)

View File

@ -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*.

View File

@ -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

View File

@ -8,16 +8,16 @@ env maps the systems environment to an associative array.
<!--
these are copied from node, but don't serve any specific purpose over here
! SUB SECTION domain
x! SUB SECTION domain
! SUB SECTION _events
x! SUB SECTION _events
! SUB SECTION argv
x! SUB SECTION argv
! SUB SECTION stdout
x! SUB SECTION stdout
! SUB SECTION CMD
x! SUB SECTION CMD
! SUB SECTION nextTick
x! SUB SECTION nextTick
-->

View File

@ -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 }