question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Cannot save "File template" when using nunjucks expressions

See original GitHub issue

Describe the bug

When I try to customize the FIle template, the input box, gets a red border and doesn´t save even with the default template that I got from the source code. It works fine if I don´t use an nunjucks expressions like {%

Method of syncing

  • Amazon Kindle Reader
  • My Clippings file (please attach file that can be used to recreate issue)

To Reproduce

Steps to reproduce the behaviour: Go to plugin settings and try to customize “File template” using nunjucks expressions

Expected behaviour

The template should be saved correctly

Screenshots

Screenshot from 2022-06-16 16-11-02

Metadata

  • OS: Linux Fedora 36
  • Plugin version 1.6.2
  • Obsidian version 0.14.15

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
brpazcommented, Jun 19, 2022

not really. I just wanted a base template to start defining my own and copied the one from the repository. I removed the trim and did my changes and it is looking fine for me.

0reactions
hadynzcommented, Nov 9, 2022

@brpaz I haven’t been able to replicate this issue. Are you able to use the latest version and confirm that you are still getting the same problem please?

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - Cannot resolve nunjucks template - Stack Overflow
I was using the API wrong. Instead of reading in the file and telling Nunjucks to render it do this: nj.configure('src'); let result ......
Read more >
Nunjucks for js files · Issue #13 · lumeland/lume - GitHub
If I rename the js file to *.njk , then it creates an output html, but doesn't parse the templates. In the particular...
Read more >
nunjucks templating docs
nunjucks does not sandbox execution so it is not safe to run user-defined templates or inject user-defined content into template definitions. On the...
Read more >
nunjucks - npm
Nunjucks is a full featured templating engine for javascript. It is heavily inspired by jinja2. View the docs here. Installation. npm install ...
Read more >
Learn the Eleventy Static Site Generator by Building and ...
What is Eleventy? Eleventy (also called 11ty) is a simple yet powerful static site generator. It uses JavaScript to transform data and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found