From fab06c980ae9f67f5a867caf07f37479ce99bc0e Mon Sep 17 00:00:00 2001 From: Markus Koller Date: Wed, 1 Nov 2017 11:56:06 +0100 Subject: [PATCH] Update gitlab-markup and PlantUML docs --- Gemfile.lock | 2 +- ...re-plantuml-restructured-text-captions.yml | 5 +++ doc/administration/integration/plantuml.md | 37 +++++++++++-------- 3 files changed, 27 insertions(+), 17 deletions(-) create mode 100644 changelogs/unreleased/feature-plantuml-restructured-text-captions.yml diff --git a/Gemfile.lock b/Gemfile.lock index 4142977285e..8ccf18818a6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -291,7 +291,7 @@ GEM diff-lcs (~> 1.1) mime-types (>= 1.16) posix-spawn (~> 0.3) - gitlab-markup (1.6.2) + gitlab-markup (1.6.3) gitlab_omniauth-ldap (2.0.4) net-ldap (~> 0.16) omniauth (~> 1.3) diff --git a/changelogs/unreleased/feature-plantuml-restructured-text-captions.yml b/changelogs/unreleased/feature-plantuml-restructured-text-captions.yml new file mode 100644 index 00000000000..3d8d0f4fcd1 --- /dev/null +++ b/changelogs/unreleased/feature-plantuml-restructured-text-captions.yml @@ -0,0 +1,5 @@ +--- +title: 'Support uml:: and captions in reStructuredText' +merge_request: 15120 +author: Markus Koller +type: changed diff --git a/doc/administration/integration/plantuml.md b/doc/administration/integration/plantuml.md index 652ca9cf454..93c3642a1f1 100644 --- a/doc/administration/integration/plantuml.md +++ b/doc/administration/integration/plantuml.md @@ -56,29 +56,34 @@ that, login with an Admin account and do following: With PlantUML integration enabled and configured, we can start adding diagrams to our AsciiDoc snippets, wikis and repos using delimited blocks: -``` -[plantuml, format="png", id="myDiagram", width="200px"] --- -Bob->Alice : hello -Alice -> Bob : Go Away --- -``` +- **Markdown** -And in Markdown using fenced code blocks: + ```plantuml + Bob -> Alice : hello + Alice -> Bob : Go Away + ``` - ```plantuml - Bob -> Alice : hello +- **AsciiDoc** + + ``` + [plantuml, format="png", id="myDiagram", width="200px"] + -- + Bob->Alice : hello Alice -> Bob : Go Away + -- ``` -And in reStructuredText using a directive: +- **reStructuredText** -``` -.. plantuml:: + ``` + .. plantuml:: + :caption: Caption with **bold** and *italic* - Bob -> Alice: hello - Alice -> Bob: Go Away -``` + Bob -> Alice: hello + Alice -> Bob: Go Away + ``` + + You can also use the `uml::` directive for compatibility with [sphinxcontrib-plantuml](https://pypi.python.org/pypi/sphinxcontrib-plantuml), but please note that we currently only support the `caption` option. The above blocks will be converted to an HTML img tag with source pointing to the PlantUML instance. If the PlantUML server is correctly configured, this should