[Cmake-commits] CMake branch, master, updated. v3.14.1-612-gffcb4f7
Kitware Robot
kwrobot at kitware.com
Fri Apr 5 08:53:05 EDT 2019
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via ffcb4f7ec5789fb62812b88f3909100a29277e44 (commit)
via a9b38a17571bca0801594adf85fef59fac51d6ba (commit)
via 2024327746747989f47dec3859e2ca4bc66267c3 (commit)
from 52fb35bd69ec2fa1a5307695cb22c3f125debf4f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ffcb4f7ec5789fb62812b88f3909100a29277e44
commit ffcb4f7ec5789fb62812b88f3909100a29277e44
Merge: 52fb35b a9b38a1
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Apr 5 12:51:18 2019 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Apr 5 08:51:25 2019 -0400
Merge topic 'rst-bad-markup-block'
a9b38a1757 cmRST: Fix crash on empty markup block
2024327746 Help: Remove empty literal block markup in RESOURCE target property
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !3197
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a9b38a17571bca0801594adf85fef59fac51d6ba
commit a9b38a17571bca0801594adf85fef59fac51d6ba
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Apr 5 08:13:43 2019 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Apr 5 08:18:14 2019 -0400
cmRST: Fix crash on empty markup block
diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx
index b7216b0..2064275 100644
--- a/Source/cmRST.cxx
+++ b/Source/cmRST.cxx
@@ -457,6 +457,12 @@ void cmRST::UnindentLines(std::vector<std::string>& lines)
size_t trailingEmpty =
std::distance(rit, cmFindNot(cmReverseRange(lines), std::string()));
+ if ((leadingEmpty + trailingEmpty) >= lines.size()) {
+ // All lines are empty. The markup block is empty. Leave only one.
+ lines.resize(1);
+ return;
+ }
+
std::vector<std::string>::iterator contentEnd = cmRotate(
lines.begin(), lines.begin() + leadingEmpty, lines.end() - trailingEmpty);
lines.erase(contentEnd, lines.end());
diff --git a/Tests/CMakeLib/testRST.expect b/Tests/CMakeLib/testRST.expect
index d7b91d1..c19ee94 100644
--- a/Tests/CMakeLib/testRST.expect
+++ b/Tests/CMakeLib/testRST.expect
@@ -83,6 +83,10 @@ or after a paragraph ending in two colons::
but not after a line ending in two colons::
in the middle of a paragraph.
+A literal block can be empty::
+
+
+
.. productionlist::
grammar: `production`
production: "content rendered"
diff --git a/Tests/CMakeLib/testRST.rst b/Tests/CMakeLib/testRST.rst
index 633219f..d2d1140 100644
--- a/Tests/CMakeLib/testRST.rst
+++ b/Tests/CMakeLib/testRST.rst
@@ -90,6 +90,10 @@ or after a paragraph ending in two colons::
but not after a line ending in two colons::
in the middle of a paragraph.
+A literal block can be empty::
+
+
+
.. productionlist::
grammar: `production`
production: "content rendered"
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2024327746747989f47dec3859e2ca4bc66267c3
commit 2024327746747989f47dec3859e2ca4bc66267c3
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Apr 5 08:12:39 2019 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Apr 5 08:18:14 2019 -0400
Help: Remove empty literal block markup in RESOURCE target property
This was added accidentally by commit 456e0fb64f (Help: Improve
documentation formating, 2019-04-01).
diff --git a/Help/prop_tgt/RESOURCE.rst b/Help/prop_tgt/RESOURCE.rst
index 6ada637..e5a1cb6 100644
--- a/Help/prop_tgt/RESOURCE.rst
+++ b/Help/prop_tgt/RESOURCE.rst
@@ -11,7 +11,7 @@ directory (eg. ``Resources`` directory for macOS) inside the bundle.
On non-Apple platforms these files may be installed using the ``RESOURCE``
option to the :command:`install(TARGETS)` command.
-Following example of Application Bundle::
+Following example of Application Bundle:
.. code-block:: cmake
-----------------------------------------------------------------------
Summary of changes:
Help/prop_tgt/RESOURCE.rst | 2 +-
Source/cmRST.cxx | 6 ++++++
Tests/CMakeLib/testRST.expect | 4 ++++
Tests/CMakeLib/testRST.rst | 4 ++++
4 files changed, 15 insertions(+), 1 deletion(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list