zhaorui2022 opened a new issue, #67986:
URL: https://github.com/apache/airflow/issues/67986

   ### Under which category would you file this issue?
   
   Airflow Core
   
   ### Apache Airflow version
   
   3.2.2
   
   ### What happened and how to reproduce it?
   
   When using operators with f-strings, the code syntax highlighting is 
incorrect. 
   
   An example to reproduce the issue
   ```
       table_name = "example_catalog.example_schema.example_table"
   
       validate_data = DatabricksSqlOperator(
           task_id="validate_data",
           sql=f"""
           SELECT CASE WHEN COUNT(*) = 0 THEN 1 ELSE 0 END
           FROM {table_name}
           WHERE ds = '{{{{ ds }}}}'
           """,
           databricks_conn_id="databricks_default",
       )
   ```
   
   This is rendered like this
   
   <img width="595" height="333" alt="Image" 
src="https://github.com/user-attachments/assets/586fb6af-40a8-4785-863e-e0ab16f19fd6";
 />
   
   ### What you think should happen instead?
   
   ```
   FROM {table_name}
   WHERE ds = '{{{{ ds }}}}'
   ```
   should be red
   and 
   ```
   ,
   databricks_conn_id="databricks_default",
   ```
   should be black
   
   ### Operating System
   
   Debian GNU/Linux 12 (bookworm)
   
   ### Deployment
   
   None
   
   ### Apache Airflow Provider(s)
   
   _No response_
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Official Helm Chart version
   
   Not Applicable
   
   ### Kubernetes Version
   
   _No response_
   
   ### Helm Chart configuration
   
   _No response_
   
   ### Docker Image customizations
   
   Used the official docker image for 3.2.2
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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