-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Variable names with space #48
Comments
Oh! I didn't notice this. Thanks for your comment. I think this happened
after variable triggers were introduced which use space and color as
separator.
|
Hey! Any chance you can fix this? |
It's a bit tricky. Don't you have control over the incoming data?
If you chose to use |
I could, but it will require migrating a lot of documents and communicating with people who are using those. This way, it's more readable to the average user, who is already struggling with using Word documents at all. It would be great, but if not, I will have to stick to the older versions. Or maybe I can fix it? I’m not familiar with the code, though. |
I have a few ideas. Let me try them out, and I'll get back to you next week. 🏃 |
Hi @gebes and sorry! The problem is that there are now various possible param keys with flavors:
❗ Separator featureWhich is necessary for any kind of slices: strings, numbers. 0.
|
Oh, still, thanks for doing this, @bobiverse! I really appreciate it.
Wouldn't it make more sense, to have {{ListVariables "/ "}}? Makes it clearer while reading Could you create more detailed documentation on all of those features? It would be really helpful Also, as an idea: is there a way to include if clauses? For example, if I want to show a paragraph only when a certain condition is met? |
It all started with a single format, Now I might add There were a few suggestions to add conditional blocks, but I’m not a fan. I’d rather keep the logic outside the template and use simple triggers like Thanks for the feedback—it's motivating me to:
|
💡 Quick Idea: In your template, do you only use a simple key format such as:
(without the separators and triggers I mentioned before)? I could add something like
|
That would work well! However, to make it a bit more well-rounded, I think creating a |
ah! Like |
Exactly |
While playing around with the new version, I noticed an issue with tables like these:
These tables worked well in the previous version 1.2.5, but in 1.4.4 they don't work at all somehow? Did something change? Additionally, I have a feature idea: |
See: https://github.com/bobiverse/docxplate/tree/saving-private-gebes Could you test from that branch? |
I see what you did there :D I'll check it out now |
It is working partially. |
It looks it's fixed "variables with spaces", but other issues let's move to new issues. I wanted to fix at once, but there is such a mess. I'll better rewrite whole params replace logic 🤷 |
Hello!
Up until version 1.2.5, it was possible to use variable names with spaces in between, like the following, to make templates more readable for users:
{{Customer Firstname}} {{Customer Surname}}
Could you please bring this feature back? Every version after 1.2.5 no longer supports it.
The text was updated successfully, but these errors were encountered: