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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to