Skip to content

Commit

Permalink
fix: underlining in Checkout template
Browse files Browse the repository at this point in the history
  • Loading branch information
ReinderVosDeWael committed Jul 25, 2024
1 parent d2ab583 commit b009d40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
settings.json
local
postgresql
*.sqlite
.DS_Store
Expand Down
3 changes: 2 additions & 1 deletion src/routes/templates/Checkout/Checkout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
let isLoading = false
let values: string[] = []
const texts = nodes.map(node => `*[${node.parent?.text}]{.underline}*\n\n${node.text}`)
// A custom LUA filter in the backend converts ++{}++ to underlined. Commonmark does not support underlining.
const texts = nodes.map(node => `*++${node.parent?.text}++*\n\n${node.text}`)
const templates = texts.map(text => getTemplateValues(text)).flat()
const uniqueTemplates = templates.filter((value, _, self) => self.find(elem => elem.text === value.text) === value)
const inputTemplates = uniqueTemplates.filter(value => value.type === "input")
Expand Down

0 comments on commit b009d40

Please sign in to comment.