Skip to content

tools: kconfig2html: Handle blank input lines#19322

Open
Old-Ding wants to merge 1 commit into
apache:masterfrom
Old-Ding:codex/kconfig2html-blank-line
Open

tools: kconfig2html: Handle blank input lines#19322
Old-Ding wants to merge 1 commit into
apache:masterfrom
Old-Ding:codex/kconfig2html-blank-line

Conversation

@Old-Ding

@Old-Ding Old-Ding commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

read_line() removes a trailing newline and then checks g_line[len - 1] for a line-continuation backslash. A blank input line leaves len at zero, so the continuation check reads before g_line.

Return the empty line to the caller before checking for a continuation. kconfig_line() already skips empty lines, so parser behavior stays unchanged.

Validation

  • git diff --check origin/master..HEAD
  • git show --check --stat --oneline HEAD
  • git ls-files --eol tools/kconfig2html.c

I could not run a host C compile locally because this Windows environment does not have gcc or clang installed.

@github-actions github-actions Bot added Area: Tooling Size: XS The size of the change in this PR is very small labels Jul 5, 2026
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

@linguini1

Copy link
Copy Markdown
Contributor

I think you should try running the tool to make sure that your change does what you want

@Old-Ding Old-Ding force-pushed the codex/kconfig2html-blank-line branch from bdb2d9d to 68a72dc Compare July 8, 2026 03:38
read_line() removes a trailing newline and then checks g_line[len - 1]
for a line-continuation backslash. A blank line leaves len at zero, so
the continuation check reads before g_line.

Return the empty line to the caller before checking for a continuation.
kconfig_line() already skips empty lines, so parser behavior is
unchanged.

Signed-off-by: Old-Ding <ai.neo.ae86@gmail.com>
@Old-Ding Old-Ding force-pushed the codex/kconfig2html-blank-line branch from 68a72dc to c4d0fb4 Compare July 8, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Tooling Size: XS The size of the change in this PR is very small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants