davidradl commented on code in PR #27550:
URL: https://github.com/apache/flink/pull/27550#discussion_r2786910789


##########
docs/setup_docs.sh:
##########
@@ -67,4 +67,22 @@ if [ "$SKIP_INTEGRATE_CONNECTOR_DOCS" = false ]; then
 
   cd ..
   rm -rf tmp
+
+  # Fix incorrect ref syntax in connector docs
+  # Some external connector repositories contain incorrect Hugo ref shortcode 
syntax
+  # when referencing main Flink docs with anchors.
+  #
+  # The correct syntax for refs with anchors is: {{< ref "path" >}}#anchor
+  # Incorrect syntax: {{< ref "path/#anchor" >}} or {{< ref "path/.../" 
>}}#anchor
+  #
+  # This automatic fix detects and corrects these syntax errors in integrated
+  # connector docs, ensuring the documentation builds successfully.
+  #
+  # Note: Connector maintainers should use the correct syntax in their repos.
+  # Related tracking issues:
+  #   - flink-connector-kinesis: 
https://issues.apache.org/jira/browse/FLINK-39046
+  find themes/connectors -name "*.md" -type f -exec sed -i 's|{{< ref 
"\(docs/ops/[^"/#]*\)/*#\([^"]*\)" >}}|{{< ref "\1" >}}#\2|g' {} +

Review Comment:
   the difference between the first 2 lines appears to be some spaces, can we 
not fold these optional spaces into less than 4 regexes? 
   



-- 
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]

Reply via email to