Skip to content
Snippets Groups Projects
Commit c5515bd1 authored by Tobias Zimmermann's avatar Tobias Zimmermann
Browse files

Issue #1323530 by tstoeckler: Document libraries_get_version() pattern matching.

parent 256d7c10
No related branches found
No related tags found
No related merge requests found
Libraries 7.x-2.x, xxxx-xx-xx Libraries 7.x-2.x, xxxx-xx-xx
----------------------------- -----------------------------
#1323530 by tstoeckler: Document libraries_get_version() pattern matching.
#1325524 by sun, Rob Loach, tstoeckler: Statically cache libraries_detect(). #1325524 by sun, Rob Loach, tstoeckler: Statically cache libraries_detect().
#1321372 by Rob Loach: Provide a 'post-load' callback group. #1321372 by Rob Loach: Provide a 'post-load' callback group.
#1205854 by tstoeckler, sun: Test library caching. #1205854 by tstoeckler, sun: Test library caching.
......
...@@ -51,7 +51,10 @@ ...@@ -51,7 +51,10 @@
* - file: The filename to parse for the version, relative to the library * - file: The filename to parse for the version, relative to the library
* path. For example: 'docs/changelog.txt'. * path. For example: 'docs/changelog.txt'.
* - pattern: A string containing a regular expression (PCRE) to match the * - pattern: A string containing a regular expression (PCRE) to match the
* library version. For example: '@version\s+([0-9a-zA-Z\.-]+)@'. * library version. For example: '@version\s+([0-9a-zA-Z\.-]+)@'. Note
* that the returned version is not the match of the entire pattern (i.e.
* '@version 1.2.3' in the above example) but the match of the first
* sub-pattern (i.e. '1.2.3' in the above example).
* - lines: (optional) The maximum number of lines to search the pattern in. * - lines: (optional) The maximum number of lines to search the pattern in.
* Defaults to 20. * Defaults to 20.
* - cols: (optional) The maximum number of characters per line to take into * - cols: (optional) The maximum number of characters per line to take into
......
...@@ -703,7 +703,10 @@ function libraries_load_files($library) { ...@@ -703,7 +703,10 @@ function libraries_load_files($library) {
* - file: The filename to parse for the version, relative to the library * - file: The filename to parse for the version, relative to the library
* path. For example: 'docs/changelog.txt'. * path. For example: 'docs/changelog.txt'.
* - pattern: A string containing a regular expression (PCRE) to match the * - pattern: A string containing a regular expression (PCRE) to match the
* library version. For example: '@version\s+([0-9a-zA-Z\.-]+)@'. * library version. For example: '@version\s+([0-9a-zA-Z\.-]+)@'. Note that
* the returned version is not the match of the entire pattern (i.e.
* '@version 1.2.3' in the above example) but the match of the first
* sub-pattern (i.e. '1.2.3' in the above example).
* - lines: (optional) The maximum number of lines to search the pattern in. * - lines: (optional) The maximum number of lines to search the pattern in.
* Defaults to 20. * Defaults to 20.
* - cols: (optional) The maximum number of characters per line to take into * - cols: (optional) The maximum number of characters per line to take into
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment