You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "nchammas (via GitHub)" <gi...@apache.org> on 2026/10/06 08:03:44 UTC
Re: [PR] [MINOR][DOCS] Fix broken HTML table in sql-error-conditions caused by placeholders inside code spans [spark]
nchammas commented on code in PR #59010:
URL: https://github.com/apache/spark/pull/59010#discussion_r4192823761
##########
docs/_plugins/build-error-docs.py:
##########
@@ -22,7 +22,17 @@
def assemble_message(message_parts):
message = " ".join(message_parts)
- cleaned_message = re.sub(r"(<.*?>)", lambda x: f"`{x.group(1)}`", message)
+ # Wrap bare `<placeholder>` tokens in backticks so that Markdown renders them as code
+ # and escapes the angle brackets. Placeholders that already sit inside an inline code
+ # span (e.g. `APPROX NEAREST <numResults> BY ...`) must be left alone: inserting
+ # backticks there would split the span and leak the placeholder into the generated
+ # HTML as a raw tag, which the browser then treats as an element and which breaks the
+ # surrounding table structure. See apache/spark GitHub issue #58094.
Review Comment:
I would trim this comment to something shorter:
> If a message section contains backticks (e.g. \`APPROX NEAREST \<numResults\> BY ...\`), keep it as-is. Otherwise, wrap `<placeholder>` tags with backticks so they are not interpreted as HTML tags.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org