Skip to content

Commit

Permalink
fix: handle mustache comments
Browse files Browse the repository at this point in the history
Closes #1
  • Loading branch information
steve-chavez committed Sep 18, 2023
1 parent be6095b commit 0f3f9cc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/expected/plmustache.out
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,15 @@ select hello(ARRAY[1,2,3]);
Hello, {1,2,3}
(1 row)

create or replace function hello_w_comment(x text) returns text as $$
Hello,{{! ignore me }} {{x}}
$$ language plmustache;
select hello_w_comment('ignored');
hello_w_comment
-----------------
Hello, ignored
(1 row)

create function hello_no_ret_text(x text) returns int as $$
Hello, {{x}}
$$ language plmustache;
Expand Down
6 changes: 6 additions & 0 deletions test/sql/plmustache.sql
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ $$ language plmustache;

select hello(ARRAY[1,2,3]);

create or replace function hello_w_comment(x text) returns text as $$
Hello,{{! ignore me }} {{x}}
$$ language plmustache;

select hello_w_comment('ignored');

create function hello_no_ret_text(x text) returns int as $$
Hello, {{x}}
$$ language plmustache;
Expand Down

0 comments on commit 0f3f9cc

Please sign in to comment.