luozongle01 commented on PR #2206:
URL: https://github.com/apache/zookeeper/pull/2206#issuecomment-2462473973

   Hi @kezhuw  ,  I made some changes, could you take a look at it for me?
   
   I won't touch the annotation content now.
   
   > But I still formatted it a little bit here, because for example, field 
needs a few spaces, class does not need spaces, and the number of spaces in 
java and c is also different.
   ```java
     private static String getComments(String space, List<String> commentList) {
         if (commentList == null || commentList.isEmpty()) {
             return "";
         }
   
         String comments = String.join("", commentList);
   
         StringBuilder formatBuilder = new StringBuilder();
         for (String s : comments.split("\r?\n")) {
             formatBuilder.append("\n")
                     .append(space)
                     .append(s.replaceAll("^[ \t]+", ""));
         }
   
         return formatBuilder.append("\n").toString();
     }
   ````
   
   Now the comment is like this
   <img width="1343" alt="image" 
src="https://github.com/user-attachments/assets/d018d3cf-d30f-49b3-a4fd-90008f0e7f06";>
   <img width="1256" alt="image" 
src="https://github.com/user-attachments/assets/38ba86f4-cc0b-4156-8bc7-6540abe3b20e";>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to