AltimateAI / AltimateAI/vscode-dbt-power-user

Compiled preview looks different that actual compiled code

Đang mở
#356 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug hacktoberfest2023
Ngôn ngữ chính
JavaScript
Star
585
Fork
121
Merge trung bình
5 ngày 39 phút
Pull request đã merge (30 ngày)
4

Mô tả

### Expected behavior

Compiled preview look the same as actual compiled code

### Actual behavior

As title suggests. It seems that jinja's trimming whitespaces is not being considered. See screenshots.

### Steps To Reproduce

Macro used:

```sql
{% macro get_payment_type_description(payment_type) -%}
case {{ payment_type }}
when 1 then 'Credit Card'
when 2 then 'Cash'
when 3 then 'No charge'
when 4 then 'Dispute'
when 5 then 'Unknown'
when 6 then 'Voided trip'
end
{%- endmacro %}
```

### Log output/Screenshots

- Compiled code:
![image](https://user-images.githubusercontent.com/47462792/222990366-1c2f2472-8240-46e9-a522-3b23d5076eb4.png)

- Preview:
![image](https://user-images.githubusercontent.com/47462792/222990382-521d3bad-9275-478c-8b99-0e96692b17b4.png)

### Operating System

Ubuntu 20.04 on WSL2

### dbt version

1.4.4

### dbt Adapter

bigquery

### dbt Power User version

0.11.6

### Are you willing to submit PR?

- [ ] Yes I am willing to submit a PR!

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.