bazelbuild / bazelbuild/stardoc

Change alignment of columns in table

Open
#77 2 comments 0 reactions 0 assignees View on GitHub
P4 type: feature request
Dominant language
Java
Stars
118
Forks
51
PR merge metrics
No merged PRs in 30d

Description

Hi,

We want to have top aligned Name column in the table for our generated macro documents.
The reason for this is because sometimes we have quite much text in the Description column and then the Name is hard to see when it's aligned in the middle.

We have tried to keep the Markdown format in the template and achieve this but have failed with that.
Instead of:
```markdown
| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
#foreach ($param in $funcInfo.getParameterList())
| $param.name | #if(!$param.docString.isEmpty()) ${util.markdownCellFormat($param.docString)} #else

-

#end | #if(!$param.getDefaultValue().isEmpty()) $param.getDefaultValue() #else none #end|
#end
```

We have now added html to be able to get the alignment:
```markdown

#foreach ($param in $funcInfo.getParameterList())

#end

Name
Description
Mandatory
Default Value

$param.name

#if(!$param.docString.isEmpty()) ${util.markdownCellFormat($param.docString)}#else

-

#end


$param.mandatory
#if(!$param.getDefaultValue().isEmpty())$param.getDefaultValue() #else none #end

```
It's not what we prefer since it will not be as nice to read as Markdown.

Do you have any idea how to fix this and still keep the Markdown format?

We can live with our html in the template but it's not the preferred solution.

Thanks!

Contributor guide

Open the contributing guide

Research direction

No source file or test is named. Start by locating the template that generates the parameter table, then compare the Markdown and HTML examples in the issue. Done means the Name column is top-aligned while the preferred Markdown table format remains usable.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, markdown
Domain
documentation
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.