nit.git
5 years agoMerge: gitlab-ci: add android
Jean Privat [Thu, 21 Feb 2019 23:38:03 +0000 (18:38 -0500)]
Merge: gitlab-ci: add android

Add android test and build to gitlab-ci. This also fixes some issues.

Note: the version of the android tools are not the most recent. Trying to update the android toolchain to a more modern one should be done in another PR.

Prof of concept: https://gitlab.com/nit/nit-ci/-/jobs/164255403/artifacts/browse/apk/

Pull-Request: #2736

5 years agoMerge: curl: fix concurrent requests and intro shortcut services for scripts
Jean Privat [Thu, 21 Feb 2019 23:38:01 +0000 (18:38 -0500)]
Merge: curl: fix concurrent requests and intro shortcut services for scripts

This PR brings 2 main changes:

* The handle to a Curl request is now kept by the `CurlRequest` instances, instead of being shared by all requests. This makes it possible to execute concurrent HTTP requests.

* Intro two new services on `Text` to execute simple HTTP requests. While these new services are useful to simple scripts, if more control is needed you should still use `CurlHTTPRequest`.

  `Text::http_get` makes a GET request and returns the response body.

  `Text::http_download` makes a GET request and saves the response body to a file.

Pull-Request: #2731
Reviewed-by: Jean Privat <jean@pryen.org>

5 years agogitlab-ci: contrib android
Jean Privat [Wed, 20 Feb 2019 00:42:36 +0000 (19:42 -0500)]
gitlab-ci: contrib android

Signed-off-by: Jean Privat <jean@pryen.org>

5 years agogitlab-ci: add .gradle to the cache
Jean Privat [Tue, 19 Feb 2019 20:30:35 +0000 (15:30 -0500)]
gitlab-ci: add .gradle to the cache

Signed-off-by: Jean Privat <jean@pryen.org>

5 years agogitlab-ci: don't abort if grep select nothing
Jean Privat [Tue, 19 Feb 2019 20:17:42 +0000 (15:17 -0500)]
gitlab-ci: don't abort if grep select nothing

Signed-off-by: Jean Privat <jean@pryen.org>

5 years agogitlab_ci: basic test for android
Jean Privat [Tue, 19 Feb 2019 19:59:34 +0000 (14:59 -0500)]
gitlab_ci: basic test for android

Signed-off-by: Jean Privat <jean@pryen.org>

5 years agoantroid/README.md: add raw (for nitunit)
Jean Privat [Tue, 19 Feb 2019 21:02:24 +0000 (16:02 -0500)]
antroid/README.md: add raw (for nitunit)

Signed-off-by: Jean Privat <jean@pryen.org>

5 years agogitlab_ci: unblacklist android
Jean Privat [Tue, 19 Feb 2019 19:59:17 +0000 (14:59 -0500)]
gitlab_ci: unblacklist android

Signed-off-by: Jean Privat <jean@pryen.org>

5 years agodocker/nit-ci: add imagemagick
Jean Privat [Wed, 20 Feb 2019 01:29:36 +0000 (20:29 -0500)]
docker/nit-ci: add imagemagick

Signed-off-by: Jean Privat <jean@pryen.org>

5 years agodocker/ci: install android sdk&ndk
Jean Privat [Tue, 19 Feb 2019 19:56:16 +0000 (14:56 -0500)]
docker/ci: install android sdk&ndk

Note: android-ndk is downloaded in the google archive

Signed-off-by: Jean Privat <jean@pryen.org>

5 years agoandroid-bdwgc: remove --depth=1 to avoid missing commits
Jean Privat [Tue, 19 Feb 2019 19:55:19 +0000 (14:55 -0500)]
android-bdwgc: remove --depth=1 to avoid missing commits

Signed-off-by: Jean Privat <jean@pryen.org>

5 years agoMerge: tests.sh: special case when running in gitlab_ci
Jean Privat [Mon, 18 Feb 2019 16:26:57 +0000 (11:26 -0500)]
Merge: tests.sh: special case when running in gitlab_ci

When run is a containerized environment, some tests may behave differently.
This prepares some special cases for them.

Cf #2732

Pull-Request: #2735

5 years agoMerge: lib&contrib: add some raw and nitish in READMEs
Jean Privat [Mon, 18 Feb 2019 16:26:54 +0000 (11:26 -0500)]
Merge: lib&contrib: add some raw and nitish in READMEs

nitunit in jenkins did not test READMEs (cf #2313)
In order to test them, first fix them!

Pull-Request: #2734

5 years agoMerge: tests/base_autocast: workaround a gcc bug
Jean Privat [Mon, 18 Feb 2019 16:26:50 +0000 (11:26 -0500)]
Merge: tests/base_autocast: workaround a gcc bug

Versions of gcc between bellow 6.4.1 and 7.3.1 failed to compile
correctly the generated C.
So this changes the Nit, so the C can be compiled with buggy gcc versions.

Cf https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85244 for details

Pull-Request: #2733

5 years agoMerge: docker: add image for continuous integration (without nit)
Jean Privat [Mon, 18 Feb 2019 16:26:44 +0000 (11:26 -0500)]
Merge: docker: add image for continuous integration (without nit)

This prepares a new image that we will use for continuous integration.

Basically, it is a lot of stuff required by tests, libs and contribs of nit, but without nit

Pull-Request: #2732

5 years agoMerge: Makefile: fix make clean
Jean Privat [Mon, 18 Feb 2019 16:25:11 +0000 (11:25 -0500)]
Merge: Makefile: fix make clean

make clean errors out without cleaning everything. Fixes the make file to use rm -f when appropriate and -cmd otherwise.
Added cleaned message at the end to show it completed successfully (otherwise it ends in what can seem like an error message at first glance).
Signed-off-by: Hugo Leblanc <dullin@hololink.org>

Pull-Request: #2730
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

5 years agoMerge: lib/core: handling of plus (+) sign when using to_i with Text objects
Jean Privat [Mon, 18 Feb 2019 16:25:04 +0000 (11:25 -0500)]
Merge: lib/core: handling of plus (+) sign when using to_i with Text objects

While doing the Advent of Code 2018 in Nit, I encountered a file with numbers prefaced with a plus (+) sign. The to_i of Text wasn't able to handle that kind of input so I added it.

The PR add handling of prefacing + signs with the current - sign implementation. Also added the same logic to is_int so that assert can work. Added new tests in the documentation to show normal usage.

Signed-off-by: Hugo Leblanc <dullin@hololink.org>

Pull-Request: #2729
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

5 years agolib: add some nitish to avoid service configuration issues
Jean Privat [Mon, 18 Feb 2019 15:56:02 +0000 (10:56 -0500)]
lib: add some nitish to avoid service configuration issues

docunits should not require specifics like a token or a server

Signed-off-by: Jean Privat <jean@pryen.org>

5 years agotests.sh: special case when running in gitlab_ci
Jean Privat [Mon, 18 Feb 2019 15:41:34 +0000 (10:41 -0500)]
tests.sh: special case when running in gitlab_ci

When run is a containerized environment, some tests may behave differently.
This prepares some special cases for them.

Cf #2732

Signed-off-by: Jean Privat <jean@pryen.org>

5 years agotests/base_autocast: workaround a gcc bug
Jean Privat [Mon, 18 Feb 2019 15:29:01 +0000 (10:29 -0500)]
tests/base_autocast: workaround a gcc bug

Versions of gcc between bellow 6.4.1 and 7.3.1 failed to compile
correctly the generated C.
So this changes the Nit, so the C can be compiled with buggy gcc versions.

Cf https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85244 for details

Signed-off-by: Jean Privat <jean@pryen.org>

5 years agolib&contrib: add some raw and nitish in READMEs
Jean Privat [Mon, 18 Feb 2019 15:20:38 +0000 (10:20 -0500)]
lib&contrib: add some raw and nitish in READMEs

nitunit in jenkins did not test READMEs (cf #2313)
In order to test them, first fix them!

Signed-off-by: Jean Privat <jean@pryen.org>

5 years agoadd .gitlab-ci.yml
Jean Privat [Mon, 18 Feb 2019 15:06:21 +0000 (10:06 -0500)]
add .gitlab-ci.yml

Signed-off-by: Jean Privat <jean@pryen.org>

5 years agodocker: add image for continuous integration (without nit)
Jean Privat [Mon, 18 Feb 2019 14:54:25 +0000 (09:54 -0500)]
docker: add image for continuous integration (without nit)

Signed-off-by: Jean Privat <jean@pryen.org>

5 years agocurl: update test for latest changes
Alexis Laferrière [Fri, 15 Feb 2019 13:10:06 +0000 (08:10 -0500)]
curl: update test for latest changes

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

5 years agoneo4j: remove unused curl handle (using a now private class)
Alexis Laferrière [Fri, 15 Feb 2019 13:09:21 +0000 (08:09 -0500)]
neo4j: remove unused curl handle (using a now private class)

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

5 years agopopcorn: there's no more a global curl handle, so this should be fixed
Alexis Laferrière [Fri, 15 Feb 2019 13:08:38 +0000 (08:08 -0500)]
popcorn: there's no more a global curl handle, so this should be fixed

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

5 years agocurl: intro shortcut methods `http_get` and `http_download` on `Text`
Alexis Laferrière [Sat, 12 Jan 2019 04:12:50 +0000 (23:12 -0500)]
curl: intro shortcut methods `http_get` and `http_download` on `Text`

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

5 years agocurl: the libcurl handle is initiated once per request object, closed by GC or hand
Alexis Laferrière [Sat, 12 Jan 2019 04:12:10 +0000 (23:12 -0500)]
curl: the libcurl handle is initiated once per request object, closed by GC or hand

This should fix the problem with concurrent HTTP requests on different threads.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

5 years agocurl: add some more doc
Alexis Laferrière [Sat, 26 Jan 2019 20:04:41 +0000 (12:04 -0800)]
curl: add some more doc

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

5 years agocompiler: fix make clean for makefile generation
Hugo Leblanc [Thu, 3 Jan 2019 22:22:08 +0000 (17:22 -0500)]
compiler: fix make clean for makefile generation

Add -f option to rm so that the clean doesn't error if the files are absent
Signed-off-by: Hugo Leblanc <dullin@hololink.org>

5 years agoMakefile: fix make clean
Hugo Leblanc [Fri, 28 Dec 2018 17:49:05 +0000 (12:49 -0500)]
Makefile: fix make clean

make clean errors out without cleaning everything. Fixes the make file to use rm -f when appropriate and -cmd otherwise.
Added cleaned message at the end to show it completed successfully (otherwise it ends in what can seem like an error message at first glance).
Signed-off-by: Hugo Leblanc <dullin@hololink.org>

5 years agolib/core: handling of plus (+) sign when using to_i with Text objects
Hugo Leblanc [Fri, 28 Dec 2018 17:27:50 +0000 (12:27 -0500)]
lib/core: handling of plus (+) sign when using to_i with Text objects

Signed-off-by: Hugo Leblanc <dullin@hololink.org>

5 years agopostmerge: fix error_class_glob.res
Jean Privat [Tue, 14 Aug 2018 12:59:52 +0000 (08:59 -0400)]
postmerge: fix error_class_glob.res

Signed-off-by: Jean Privat <jean@pryen.org>

5 years agoMerge: src/model/model_index: model index uses BKTree
Jean Privat [Mon, 13 Aug 2018 19:25:30 +0000 (15:25 -0400)]
Merge: src/model/model_index: model index uses BKTree

This PR makes ModelIndex use a BKTree (#2718) to speed up Nitweb name similarity search queries on large code corpora.

Levenstein names comparison with 300k+ entities took a bit long (up to 10s for Nitweb with `contrib` and `src` for some queries). The use of BKTree speeds things up and brings those queries under 0.1s.

Pull-Request: #2724
Reviewed-by: Jean Privat <jean@pryen.org>

5 years agoMerge: libevent: support UNIX domain sockets and add a test and an example
Jean Privat [Mon, 13 Aug 2018 19:24:43 +0000 (15:24 -0400)]
Merge: libevent: support UNIX domain sockets and add a test and an example

Libevent server can now listen on UNIX domain sockets by calling `ConnectionFactory::bind_unix`. The method to listen on TCP ports was renamed to `bind_tcp` for clarity.

This PR intro two new supporting programs in the form of a parallel test for a libevent server and a minimal usage example. If we already had these let me know, because otherwise these two were long overdue.

This PR is built on the work of @matthmsl in #2708, thank you!

Close #2679

Pull-Request: #2726

5 years agoMerge: nitunit: Use markdown2
Jean Privat [Mon, 13 Aug 2018 19:24:41 +0000 (15:24 -0400)]
Merge: nitunit: Use markdown2

This PR makes nitunit use the new `markdown2` parser.

Changes:
* clean the warnings in `test_doc`
* migrate `nitunit` to `markdown2`
* fix some tests about indented Nit code blocks according to the CommonMark spec
* fix some tests about error location

This PR should close the bug signaled in #1394.

Pull-Request: #2725

5 years agolib: fix unrecognized code blocks in doc units
Alexandre Terrasa [Wed, 30 May 2018 14:14:20 +0000 (10:14 -0400)]
lib: fix unrecognized code blocks in doc units

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agonitunit: give exact location of fenced block in tests
Alexandre Terrasa [Wed, 30 May 2018 14:13:27 +0000 (10:13 -0400)]
nitunit: give exact location of fenced block in tests

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agonitunit: fix code blocks in tests
Alexandre Terrasa [Wed, 30 May 2018 14:13:10 +0000 (10:13 -0400)]
nitunit: fix code blocks in tests

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agocore: fix typos in doc of CircularArray
Alexis Laferrière [Tue, 24 Jul 2018 22:02:28 +0000 (18:02 -0400)]
core: fix typos in doc of CircularArray

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

5 years agocore: fix typos in union_find
Alexis Laferrière [Tue, 24 Jul 2018 17:52:41 +0000 (13:52 -0400)]
core: fix typos in union_find

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

5 years agolibevent: update package.ini tags
Alexis Laferrière [Wed, 18 Jul 2018 21:22:49 +0000 (17:22 -0400)]
libevent: update package.ini tags

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

5 years agolibevent: intro minimal usage example
Alexis Laferrière [Wed, 18 Jul 2018 20:16:40 +0000 (16:16 -0400)]
libevent: intro minimal usage example

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

5 years agolibevent: add parallel test with TCP and UNIX domain sockets
Alexis Laferrière [Wed, 18 Jul 2018 19:16:27 +0000 (15:16 -0400)]
libevent: add parallel test with TCP and UNIX domain sockets

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

5 years agolibevent: rename `bind_to` to the more precise `bind_tcp`
Alexis Laferrière [Wed, 18 Jul 2018 18:20:39 +0000 (14:20 -0400)]
libevent: rename `bind_to` to the more precise `bind_tcp`

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

5 years agolibevent: code style tweaks and cleanup
Alexis Laferrière [Wed, 18 Jul 2018 18:05:43 +0000 (14:05 -0400)]
libevent: code style tweaks and cleanup

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

5 years agolibevent: add UNIX domain socket support to addrin_to_address
Alexis Laferrière [Wed, 18 Jul 2018 18:06:59 +0000 (14:06 -0400)]
libevent: add UNIX domain socket support to addrin_to_address

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

5 years agolibevent: add UNIX domain socket support to libevent
Matthieu Le Guellaut [Mon, 4 Jun 2018 15:01:03 +0000 (11:01 -0400)]
libevent: add UNIX domain socket support to libevent

Signed-off-by: Matthieu Le Guellaut <leguellaut.matthieu@gmail.com>
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

5 years agoMerge: src/model/model_index: model index uses BKTree
Jean Privat [Thu, 5 Jul 2018 12:22:25 +0000 (08:22 -0400)]
Merge: src/model/model_index: model index uses BKTree

This PR makes ModelIndex use a BKTree (#2718) to speed up Nitweb name similarity search queries on large code corpora.

Levenstein names comparison with 300k+ entities took a bit long (up to 10s for Nitweb with `contrib` and `src` for some queries). The use of BKTree speeds things up and brings those queries under 0.1s.

Pull-Request: #2724
Reviewed-by: Jean Privat <jean@pryen.org>

5 years agonitweb: compute model index at startup
Alexandre Terrasa [Thu, 14 Jun 2018 19:57:22 +0000 (15:57 -0400)]
nitweb: compute model index at startup

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agosrc/model/model_index: fix tests
Alexandre Terrasa [Thu, 14 Jun 2018 20:20:12 +0000 (16:20 -0400)]
src/model/model_index: fix tests

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agosrc/model/model_index: use BKTree for similarity matches
Alexandre Terrasa [Thu, 14 Jun 2018 19:53:08 +0000 (15:53 -0400)]
src/model/model_index: use BKTree for similarity matches

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agosrc/model/model_index: name and full_name queries does not search prefix by default
Alexandre Terrasa [Thu, 14 Jun 2018 17:27:01 +0000 (13:27 -0400)]
src/model/model_index: name and full_name queries does not search prefix by default

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agosrc/test_model_index: add query time in interactive mode
Alexandre Terrasa [Thu, 14 Jun 2018 16:53:42 +0000 (12:53 -0400)]
src/test_model_index: add query time in interactive mode

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agosrc/test_model_index: add interactive mode
Alexandre Terrasa [Thu, 14 Jun 2018 16:34:01 +0000 (12:34 -0400)]
src/test_model_index: add interactive mode

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agosrc/test_model_index: expect `-q` option for query
Alexandre Terrasa [Thu, 14 Jun 2018 16:20:17 +0000 (12:20 -0400)]
src/test_model_index: expect `-q` option for query

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agonitunit: use the new markdown parser
Alexandre Terrasa [Wed, 30 May 2018 14:12:37 +0000 (10:12 -0400)]
nitunit: use the new markdown parser

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agosrc/nitunit: remove warnings from `testing_doc`
Alexandre Terrasa [Wed, 30 May 2018 02:49:26 +0000 (22:49 -0400)]
src/nitunit: remove warnings from `testing_doc`

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agoMerge: src/doc/commands: clean commands hierarchy
Jean Privat [Tue, 26 Jun 2018 13:30:47 +0000 (09:30 -0400)]
Merge: src/doc/commands: clean commands hierarchy

This PR does some cleaning around commands hierarchy to prepare for the merge with new-markdown (#2720).

Pull-Request: #2723

5 years agoMerge: src/doc/commands: use filters
Jean Privat [Tue, 26 Jun 2018 13:29:48 +0000 (09:29 -0400)]
Merge: src/doc/commands: use filters

This PR allows the DocCommands to use ModelFilter.

With this, one can setup the filter used by a command from:
* The commands programmatic Nit interface
   ~~~nit
   var filter = new ModelFilter(accept_test = false)
   var cmd = new CmdParents(model, main, filter, mentity_name = "MyEntity")
   ~~~
* The string interface through the CommandParser
   ~~~raw
   [[parents: MyEntity | no-test]]
   ~~~
* The HTTP interface
   ~~~raw
   /children/MyEntity?no-test=true
   ~~~

Pull-Request: #2722
Reviewed-by: Jean Privat <jean@pryen.org>

5 years agoMerge: lib/markdown2: introduce a new Markdown engine
Jean Privat [Tue, 26 Jun 2018 13:28:20 +0000 (09:28 -0400)]
Merge: lib/markdown2: introduce a new Markdown engine

This PR introduces a new Markdown engine called `markdown2`.

The current Markdown implementation is functional but does not follows the [CommonMark](http://commonmark.org/) specification as it passes only 273 tests of the 627 from the [CommonMark test suite](https://github.com/CommonMark/CommonMark).

Also there is a few issues with it as stated in #791, #1394, #1525 and #2507.

This new implementation aims at resolving these issues and follow the CommonMark specification.

Features:
* Markdown AST creation and rendering
* Rendering to HTML
* Rendering to Markdown
* Rendering to Man format
* Rendering to LaTeX
* Parsing of Github extended mode
* Parsing of wikilinks
* Parsing of LaTeX/Maths expression (upcoming in next PR)
* Respect of the CommonMark specification with only 10 tests failed (UTF-8 related)
* Extensive testing with a total of 980 test units...

I didn't remove the old markdown implementation since the benchmarks are not really good for now. Since `markdown2` uses a lot of regular expressions, performances can be an issue compared to `markdown`:

![screenshot from 2018-06-20 19 21 08](https://user-images.githubusercontent.com/583144/41689548-1a8bc5d0-74bf-11e8-899e-52b0eb093d57.png)

In the following PR some Nit tools will be migrated to the new implementation:
* nitunit
* nitiwiki
* nitdoc
* nitweb

Pull-Request: #2720

5 years agosrc/doc/commands/templates: move `commands_json` to `json_commands`
Alexandre Terrasa [Fri, 22 Jun 2018 04:05:13 +0000 (00:05 -0400)]
src/doc/commands/templates: move `commands_json` to `json_commands`

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agosrc/doc/commands/templates: move `commands_json` to `json_commands`
Alexandre Terrasa [Fri, 22 Jun 2018 04:01:30 +0000 (00:01 -0400)]
src/doc/commands/templates: move `commands_json` to `json_commands`

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agosrc/doc/commands/templates: move `commands_html` to `html_commands`
Alexandre Terrasa [Fri, 22 Jun 2018 03:59:09 +0000 (23:59 -0400)]
src/doc/commands/templates: move `commands_html` to `html_commands`

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agosrc/doc/commands/templates: rename `templates_json` in `json_model`
Alexandre Terrasa [Fri, 22 Jun 2018 03:54:06 +0000 (23:54 -0400)]
src/doc/commands/templates: rename `templates_json` in `json_model`

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agosrc/doc/commands/templates: rename `templates_term` in `term_model`
Alexandre Terrasa [Fri, 22 Jun 2018 03:49:38 +0000 (23:49 -0400)]
src/doc/commands/templates: rename `templates_term` in `term_model`

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agosrc/doc/commands/templates: rename `templates_html` in `html_model`
Alexandre Terrasa [Fri, 22 Jun 2018 03:48:20 +0000 (23:48 -0400)]
src/doc/commands/templates: rename `templates_html` in `html_model`

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agosrc/doc/commands: clean `commands_docdown`
Alexandre Terrasa [Tue, 12 Jun 2018 16:23:39 +0000 (12:23 -0400)]
src/doc/commands: clean `commands_docdown`

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agosrc/doc/commands: move cmd processing to `commands_html`
Alexandre Terrasa [Tue, 12 Jun 2018 16:07:28 +0000 (12:07 -0400)]
src/doc/commands: move cmd processing to `commands_html`

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agosrc/doc/commands: merge `doc_down` intro `templates_html`
Alexandre Terrasa [Tue, 12 Jun 2018 16:02:28 +0000 (12:02 -0400)]
src/doc/commands: merge `doc_down` intro `templates_html`

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agosrc/doc/commands: move markdown related services from `doc_down` to `commands_md`
Alexandre Terrasa [Tue, 12 Jun 2018 15:54:49 +0000 (11:54 -0400)]
src/doc/commands: move markdown related services from `doc_down` to `commands_md`

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agosrc/doc/commands: merge `catalog_json` intro `templates_json`
Alexandre Terrasa [Tue, 12 Jun 2018 15:41:59 +0000 (11:41 -0400)]
src/doc/commands: merge `catalog_json` intro `templates_json`

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agosrc/doc/commands: clean commands modules importation
Alexandre Terrasa [Tue, 12 Jun 2018 15:37:14 +0000 (11:37 -0400)]
src/doc/commands: clean commands modules importation

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agosrc/doc/commands: move `render_code` to clients modules
Alexandre Terrasa [Tue, 12 Jun 2018 15:25:31 +0000 (11:25 -0400)]
src/doc/commands: move `render_code` to clients modules

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agosrc/doc/commands: refactor `CmdCode` and `CmdEntityCode`
Alexandre Terrasa [Tue, 12 Jun 2018 15:17:48 +0000 (11:17 -0400)]
src/doc/commands: refactor `CmdCode` and `CmdEntityCode`

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agosrc/doc/commands: redef `render_comment` in `commands_html` and `commands_md`
Alexandre Terrasa [Sun, 10 Jun 2018 23:19:40 +0000 (19:19 -0400)]
src/doc/commands: redef `render_comment` in `commands_html` and `commands_md`

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agosrc/doc/templates: move `html_list_item` to `static_cards`
Alexandre Terrasa [Sun, 10 Jun 2018 23:03:33 +0000 (19:03 -0400)]
src/doc/templates: move `html_list_item` to `static_cards`

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agosrc/doc/doc_down: move base MDoc services to `mdoc` module
Alexandre Terrasa [Sun, 10 Jun 2018 22:47:50 +0000 (18:47 -0400)]
src/doc/doc_down: move base MDoc services to `mdoc` module

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agolib/html: escape Bootstrap links titles
Alexandre Terrasa [Sun, 10 Jun 2018 22:44:07 +0000 (18:44 -0400)]
lib/html: escape Bootstrap links titles

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agosrc/doc/commands: clean importation for `commands_base`
Alexandre Terrasa [Tue, 12 Jun 2018 14:59:31 +0000 (10:59 -0400)]
src/doc/commands: clean importation for `commands_base`

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agobenchmarks/markdown: add benches for markdown2
Alexandre Terrasa [Wed, 20 Jun 2018 15:15:15 +0000 (11:15 -0400)]
benchmarks/markdown: add benches for markdown2

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agolib/markdown2: introduce `nitmd` client
Alexandre Terrasa [Wed, 30 May 2018 02:38:52 +0000 (22:38 -0400)]
lib/markdown2: introduce `nitmd` client

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agolib/markdown2: introduce wikilinks parsing
Alexandre Terrasa [Wed, 30 May 2018 00:02:24 +0000 (20:02 -0400)]
lib/markdown2: introduce wikilinks parsing

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agolib/markdown2: introduce Github extended mode
Alexandre Terrasa [Wed, 30 May 2018 02:15:16 +0000 (22:15 -0400)]
lib/markdown2: introduce Github extended mode

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agolib/markdown2: introduce markdown rendering to LaTeX
Alexandre Terrasa [Tue, 29 May 2018 23:55:58 +0000 (19:55 -0400)]
lib/markdown2: introduce markdown rendering to LaTeX

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agocmd/commands_http: parse filter options from HttpRequest
Alexandre Terrasa [Tue, 15 May 2018 17:57:20 +0000 (13:57 -0400)]
cmd/commands_http: parse filter options from HttpRequest

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agocmd/commands_http: clean Bool options handling
Alexandre Terrasa [Tue, 15 May 2018 17:44:02 +0000 (13:44 -0400)]
cmd/commands_http: clean Bool options handling

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agocmd/commands_http: clean Int options handling
Alexandre Terrasa [Tue, 15 May 2018 17:43:34 +0000 (13:43 -0400)]
cmd/commands_http: clean Int options handling

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agocmd/commands_http: clean String options handling
Alexandre Terrasa [Tue, 15 May 2018 17:43:17 +0000 (13:43 -0400)]
cmd/commands_http: clean String options handling

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agocmd/cmd_parser: parse filter options from cmd string
Alexandre Terrasa [Tue, 15 May 2018 16:52:04 +0000 (12:52 -0400)]
cmd/cmd_parser: parse filter options from cmd string

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agocmd/cmd_parser: clean Bool options handling
Alexandre Terrasa [Tue, 15 May 2018 15:46:04 +0000 (11:46 -0400)]
cmd/cmd_parser: clean Bool options handling

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agocmd/cmd_parser: clean Int options handling
Alexandre Terrasa [Tue, 15 May 2018 15:42:45 +0000 (11:42 -0400)]
cmd/cmd_parser: clean Int options handling

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agocmd/cmd_parser: clean String options handling
Alexandre Terrasa [Tue, 15 May 2018 14:03:13 +0000 (10:03 -0400)]
cmd/cmd_parser: clean String options handling

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agocmd/cmd_parser: remove ModelFilter parameter from init
Alexandre Terrasa [Tue, 15 May 2018 17:27:55 +0000 (13:27 -0400)]
cmd/cmd_parser: remove ModelFilter parameter from init

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agodoc/commands: test commands with filters
Alexandre Terrasa [Tue, 15 May 2018 16:51:48 +0000 (12:51 -0400)]
doc/commands: test commands with filters

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agolib/markdown2: introduce markdown rendering to Manpages
Alexandre Terrasa [Tue, 29 May 2018 23:54:13 +0000 (19:54 -0400)]
lib/markdown2: introduce markdown rendering to Manpages

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agolib/markdown2: introduce markdown rendering to markdown
Alexandre Terrasa [Tue, 29 May 2018 23:55:11 +0000 (19:55 -0400)]
lib/markdown2: introduce markdown rendering to markdown

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agolib/markdown2: import tests from CommonMark spec
Alexandre Terrasa [Tue, 29 May 2018 23:56:40 +0000 (19:56 -0400)]
lib/markdown2: import tests from CommonMark spec

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agolib/markdown2: import tests from DaringFireball
Alexandre Terrasa [Wed, 30 May 2018 00:48:19 +0000 (20:48 -0400)]
lib/markdown2: import tests from DaringFireball

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

5 years agolib/markdown2: add tests from issues
Alexandre Terrasa [Wed, 30 May 2018 00:48:40 +0000 (20:48 -0400)]
lib/markdown2: add tests from issues

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>