Skip to content

Comments

Fix LIST YAMLParseError bug#249

Open
ltctceplrm wants to merge 6 commits intomProjectsCode:masterfrom
ltctceplrm:master
Open

Fix LIST YAMLParseError bug#249
ltctceplrm wants to merge 6 commits intomProjectsCode:masterfrom
ltctceplrm:master

Conversation

@ltctceplrm
Copy link
Contributor

@ltctceplrm ltctceplrm commented Feb 7, 2026

See issue #181

Note that the correct template in this case becomes actorsList: {{ LIST:actors }} without any quotes around the template!

@ltctceplrm
Copy link
Contributor Author

Seeing as #250 was posted recently I thought I might improve the PR a bit by adding a fix for this as well

This adds support for wikilinks in templates with an important note: The frontmatter does not accept wikilinks in comma separated values and would create invalid yaml so I split up ENUM and LIST into ENUM, ENUMYAML, LIST and LISTYAML. ENUMYAML ignores the requested wikiquotes and just outputs the comma separated values without any wikiquotes.

So you've got two options for the YAML:
actorsList: {{ LISTYAML:[[actors]] }}

actorsList: 
  - "[[Andy Lau]]"
  - "[[Tony Leung Chiu-wai]]"
  - "[[Anthony Chau-Sang Wong]]"

actorsEnum: {{ ENUMYAML:actors }}

actorsEnum: Andy Lau, Tony Leung Chiu-wai, Anthony Chau-Sang Wong

And two options for the body of the note:

{{ LIST:[[actors]] }}

  - [[Andy Lau]]
  - [[Tony Leung Chiu-wai]]
  - [[Anthony Chau-Sang Wong]]

{{ ENUM:[[actors]] }}

[[Andy Lau]], [[Tony Leung Chiu-wai]], [[Anthony Chau-Sang Wong]]

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.

1 participant