Skip to content

Commit d7062c8

Browse files
donaldhNipaLocal
authored andcommitted
tools/net/ynl-gen-rst: Remove extra indentation from generated docs
The output from ynl-gen-rst.py has extra indentation that causes extra <blockquote> elements to be generated in the HTML output. Reduce the indentation so that sphinx doesn't generate unnecessary <blockquote> elements. Signed-off-by: Donald Hunter <[email protected]> Reviewed-by: Breno Leitao <[email protected]> Signed-off-by: NipaLocal <nipa@local>
1 parent 2f7f27e commit d7062c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/net/ynl/ynl-gen-rst.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def rst_paragraph(paragraph: str, level: int = 0) -> str:
6969

7070
def rst_bullet(item: str, level: int = 0) -> str:
7171
"""Return a formatted a bullet"""
72-
return headroom(level) + f" - {item}"
72+
return headroom(level) + f"- {item}"
7373

7474

7575
def rst_subsection(title: str) -> str:
@@ -250,7 +250,7 @@ def parse_attr_sets(entries: List[Dict[str, Any]]) -> str:
250250
for k in attr.keys():
251251
if k in preprocessed + ignored:
252252
continue
253-
lines.append(rst_fields(k, sanitize(attr[k]), 2))
253+
lines.append(rst_fields(k, sanitize(attr[k]), 0))
254254
lines.append("\n")
255255

256256
return "\n".join(lines)
@@ -268,7 +268,7 @@ def parse_sub_messages(entries: List[Dict[str, Any]]) -> str:
268268
lines.append(rst_bullet(bold(value)))
269269
for attr in ['fixed-header', 'attribute-set']:
270270
if attr in fmt:
271-
lines.append(rst_fields(attr, fmt[attr], 2))
271+
lines.append(rst_fields(attr, fmt[attr], 1))
272272
lines.append("\n")
273273

274274
return "\n".join(lines)

0 commit comments

Comments
 (0)