You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ab...@apache.org on 2020/11/24 12:38:05 UTC

[nifi-minifi-cpp] branch main updated: MINIFICPP-1411 - Convert \n newline characters to
tags in the docs generation

This is an automated email from the ASF dual-hosted git repository.

aboda pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git


The following commit(s) were added to refs/heads/main by this push:
     new 41fdf48  MINIFICPP-1411 - Convert \n newline characters to <br/> tags in the docs generation
41fdf48 is described below

commit 41fdf4872be38de11967ffcdc93be5ce70d54a83
Author: Adam Hunyadi <hu...@gmail.com>
AuthorDate: Mon Nov 23 15:34:30 2020 +0100

    MINIFICPP-1411 - Convert \n newline characters to <br/> tags in the docs generation
    
    Signed-off-by: Arpad Boda <ab...@apache.org>
    
    Ths closes #941
---
 main/AgentDocs.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/main/AgentDocs.cpp b/main/AgentDocs.cpp
index 90db471..92c3e78 100644
--- a/main/AgentDocs.cpp
+++ b/main/AgentDocs.cpp
@@ -109,7 +109,8 @@ void AgentDocs::generate(const std::string &docsdir, std::ostream &genStream) {
       else{
         outfile << defaultValue;
       }
-      outfile << "|" << s.str() << "|" << prop.second.getDescription();
+      std::string description = prop.second.getDescription();
+      outfile << "|" << s.str() << "|" << utils::StringUtils::replaceAll(description, "\n", "<br/>");
       if (supportsEl){
         outfile << "<br/>**Supports Expression Language: true**";
       }
@@ -118,7 +119,8 @@ void AgentDocs::generate(const std::string &docsdir, std::ostream &genStream) {
     outfile << "### Properties " << std::endl << std::endl;
     outfile << "| Name | Description |" << std::endl << "| - | - |" << std::endl;
     for (const auto &rel : processor.second.class_relationships_) {
-      outfile << "|" << rel.getName() << "|" << rel.getDescription() << "|" << std::endl;
+      std::string description = rel.getDescription();
+      outfile << "|" << rel.getName() << "|" << utils::StringUtils::replaceAll(description, "\n", "<br/>") << "|" << std::endl;
     }
 
     outfile << std::endl;