Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
LakshanWeerasinghe opened this issue Dec 6, 2022 · 0 comments · May be fixed by #43786
Open

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

LakshanWeerasinghe opened this issue Dec 6, 2022 · 0 comments · May be fixed by #43786
Assignees
Labels
Priority/High Team/DevTools Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs ) Type/Bug

Comments

@LakshanWeerasinghe
Copy link
Contributor

LakshanWeerasinghe commented Dec 6, 2022

Description

When we add an example for an api for readability purposes we keep empty lines.

table<Employee> key(id) employees = table [
       {name: "Jo", salary: 1200, id: 2121},
       {name: "Emma", salary: 800, id: 2122},
       {name: "John", salary: 1500, id: 2123}
 ];

 Employee[] employeeArray = employees.toArray();

 type Employee record {|
   readonly int id;
   string name;
   decimal salary;
 |};

Above code snippet should have two empty lines for toArray() api doc in table langlib. But when we generate the docs it is not visible.
Screenshot 2022-12-06 at 11 03 53

Steps to Reproduce

# Returns a list of all the members of a table.
#
# ```ballerina
# table<Employee> key(id) employees = table [
#       {name: "Jo", salary: 1200, id: 2121},
#       {name: "Emma", salary: 800, id: 2122},
#       {name: "John", salary: 1500, id: 2123}
# ];
#
# Employee[] employeeArray = employees.toArray();
#
# type Employee record {|
#   readonly int id;
#   string name;
#   decimal salary;
# |};
# ```
#
# + t - the table
# + return - an array whose members are the members of parameter `t`

Replace the above snippet with the existing documentation in toArray() api in the table langlib. Run below two commands.

cd langlib/lang.table/src/main/ballerina/

bal doc

Affected Version(s)

2201.3.0

@ballerina-bot ballerina-bot added needTriage The issue has to be inspected and labeled manually userCategory/Compilation labels Dec 6, 2022
@LakshanWeerasinghe LakshanWeerasinghe removed needTriage The issue has to be inspected and labeled manually userCategory/Compilation labels Dec 6, 2022
@MaryamZi MaryamZi added the Team/DevTools Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs ) label Dec 7, 2022
@NipunaMadhushan NipunaMadhushan self-assigned this Dec 12, 2022
@NipunaMadhushan NipunaMadhushan moved this from In Progress to On Hold in Ballerina Team Main Board Dec 22, 2022
@NipunaMadhushan NipunaMadhushan moved this from On Hold to In Progress in Ballerina Team Main Board Jan 3, 2023
@keizer619 keizer619 moved this from In Progress to On Hold in Ballerina Team Main Board Jan 12, 2023
@NipunaMadhushan NipunaMadhushan moved this from On Hold to PR Sent in Ballerina Team Main Board Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority/High Team/DevTools Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs ) Type/Bug
Projects
Status: PR Sent
Development

Successfully merging a pull request may close this issue.

4 participants