PREVIEW ENVIRONMENT - This is not the production database. Changes will NOT be saved.

ParserFunctionTest

From PickiPedia: A knowledge base of bluegrass, old time psychedelic jams, and other public domain music
Jump to navigationJump to search

Testing parser functions on IPFS URI:[unverified]

URI: ipfs://bafybeiavz2kvaf4rfv7q46hxse4fk2tcqpzm4mgr67jbdqa2wpdarcie5y[unverified]

Basic parser functions

  • #if test: {{#if:yes|IF WORKS|IF BROKEN}}[unverified]
  • #ifeq test: {{#ifeq:a|a|IFEQ WORKS|IFEQ BROKEN}}[unverified]
  • #switch test: {{#switch:a|a=SWITCH WORKS|#default=SWITCH BROKEN}}[unverified]

String functions

  • #sub test: {{#sub:hello|0|2}}[unverified]
  • #len test: {{#len:hello}}[unverified]
  • #pos test: {{#pos:hello|l}}[unverified]
  • #replace test: {{#replace:hello|l|L}}[unverified]

Workaround: Using #pos to detect ipfs

pos of "ipfs" in URI: {{#pos:ipfs://bafybeiavz2kvaf4rfv7q46hxse4fk2tcqpzm4mgr67jbdqa2wpdarcie5y|ipfs}}[unverified]

{{{1}}}[unverified]

Maybe use #expr?

  1. expr 1+1: {{#expr:1+1}}[unverified]