Skip to content

Fix not showing empty lines in the code snippets in the description#43786

Merged
gimantha merged 1 commit intoballerina-platform:masterfrom
NipunaMadhushan:fix-api-doc-issues
May 9, 2025
Merged

Fix not showing empty lines in the code snippets in the description#43786
gimantha merged 1 commit intoballerina-platform:masterfrom
NipunaMadhushan:fix-api-doc-issues

Conversation

@NipunaMadhushan
Copy link
Contributor

Purpose

$subject

Fixes #38963

Approach

Describe how you are implementing the solutions along with the design details.

Samples

Provide high-level details about the samples related to this feature.

Remarks

List any other known issues, related PRs, TODO items, or any other notes related to the PR.

Check List

  • Read the Contributing Guide
  • Updated Change Log
  • Checked Tooling Support (#)
  • Added necessary tests
    • Unit Tests
    • Spec Conformance Tests
    • Integration Tests
    • Ballerina By Example Tests
  • Increased Test Coverage
  • Added necessary documentation
    • API documentation
    • Module documentation in Module.md files
    • Ballerina By Examples

Comment on lines +1079 to +1083
if (codeLineNode.codeDescription().toString().isEmpty()) {
doc.append("\n");
} else {
doc.append(codeLineNode.codeDescription().toString());
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doc.append(codeLineNode.codeDescription().toString().isEmpty() ? "\n" codeLineNode.codeDescription().toString());

@gimantha gimantha closed this Apr 22, 2025
@gimantha gimantha reopened this Apr 22, 2025
@codecov
Copy link

codecov bot commented Apr 22, 2025

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 75.06%. Comparing base (d6b4583) to head (f653ae5).
Report is 495 commits behind head on master.

Files with missing lines Patch % Lines
.../main/java/org/ballerinalang/docgen/Generator.java 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #43786      +/-   ##
============================================
- Coverage     77.40%   75.06%   -2.34%     
+ Complexity    58626    57557    -1069     
============================================
  Files          3446     3541      +95     
  Lines        219216   222534    +3318     
  Branches      28975    28857     -118     
============================================
- Hits         169680   167047    -2633     
- Misses        40101    46208    +6107     
+ Partials       9435     9279     -156     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gimantha gimantha merged commit 15d4ccb into ballerina-platform:master May 9, 2025
32 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Empty lines are not visible in ballerina langlib api docs examples

5 participants