-
Notifications
You must be signed in to change notification settings - Fork 647
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
Invalid characters for $FOAM_TITLE
variable cause its value to be partially duplicated
#1215
Comments
After some further investigation, and after some fixes in recent Foam versions, it looks like the issue is to do with referencing a Template: ---
foam_template:
name: "Daily Test"
title: "${1:$FOAM_TITLE}"
---
# $1
## Some header
The title is "$1". With a title of "Title of my New Note", the template expands to: ---
title: "Title of my New Note of my New Note of my New Note"
---
# Title of my New Note of my New Note of my New Note
## Some header
The title is "Title of my New Note of my New Note of my New Note". Once you increment or remove the second and last |
Wow thanks for finding that. I don't plan to address it right away, but let's leave this open in case anyone else is experiencing the problem |
Describe the bug
If
$FOAM_TITLE
exists in a template and a new note is created from it, providing a title with invalid characters, e.g.Invalid "Characters"
, will cause the variable to be expanded intoInvalid "Characters" "Characters"
.Small Reproducible Example
No response
Steps to Reproduce the Bug or Issue
$FOAM_TITLE
in a Foam template.Invalid "Characters"
$FOAM_TITLE
within the document has the duplicated text issue.Expected behavior
No duplication.
Invalid "Characters"
->Invalid "Characters"
.Screenshots or Videos
No response
Operating System Version
Windows 11
Visual Studio Code Version
VSCodium 1.77.3
Additional context
For Windows' NTFS, these basic characters aren't allowed
/?*"<>|:\
in file names.Edit: I've linked some other issues to this one. This and #1216 likely have a common cause but separating the two helped with understanding and explaining what I was seeing.
The text was updated successfully, but these errors were encountered: