Skip to content
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

Pass pathFilters as an array #4174

Merged
merged 2 commits into from Aug 22, 2019
Merged

Pass pathFilters as an array #4174

merged 2 commits into from Aug 22, 2019

Conversation

hoelzro
Copy link
Contributor

@hoelzro hoelzro commented Aug 12, 2019

Otherwise, when we try to iterate over pathFilters in the filesystem
utils module, we end up iterating over each character in the filter
string, which ends up generating 'Filter error_ Missing [ in filter
expression.tid' as the tiddler's filename

Fixes GH #4173

Otherwise, when we try to iterate over pathFilters in the filesystem
utils module, we end up iterating over each character in the filter
string, which ends up generating 'Filter error_ Missing [ in filter
expression.tid' as the tiddler's filename

Fixes GH Jermolene#4173
@Jermolene
Copy link
Owner

Thanks @hoelzro that's definitely an oversight. The docs say that the tiddler should be a newline delimited list of filters so perhaps we can fix it like this:

		// Otherwise, we'll need to generate it
		fileInfo = $tw.utils.generateTiddlerFileInfo(tiddler,{
			directory: $tw.boot.wikiTiddlersPath,
			pathFilters: this.wiki.getTiddlerText("$:/config/FileSystemPaths","").split("\n"),
			wiki: this.wiki
		});

@hoelzro
Copy link
Contributor Author

hoelzro commented Aug 15, 2019

Oh, great point @Jermolene - I didn't realize that there could be more than one filter! I'll fix that up right away.

...via $:/config/FileSystemPaths, split by newlines
@hoelzro
Copy link
Contributor Author

hoelzro commented Aug 15, 2019

@Jermolene Alright, I've applied your suggestion - thanks!

@hoelzro
Copy link
Contributor Author

hoelzro commented Aug 22, 2019

@Jermolene How does the revised change look to you?

@Jermolene
Copy link
Owner

Thanks @hoelzro

@Jermolene Jermolene merged commit 0402dbd into Jermolene:master Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants