diff --git a/Docs/SpecialInputElements.md b/Docs/SpecialInputElements.md index 34e19aba6..80e812661 100644 --- a/Docs/SpecialInputElements.md +++ b/Docs/SpecialInputElements.md @@ -46,22 +46,22 @@ removePostfixes | remove these snippets of text from the end of the passed strin ``` "freeform": { - "key": "name:etymology:wikidata", - "type": "wikidata", - "helperArgs": [ - "name", - { - "removePostfixes": [ - "street", - "boulevard", - "path", - "square", - "plaza", - ] - } - ] - } - ``` + "key": "name:etymology:wikidata", + "type": "wikidata", + "helperArgs": [ + "name", + { + "removePostfixes": [ + "street", + "boulevard", + "path", + "square", + "plaza", + ] + } + ] +} +``` ## int @@ -118,18 +118,19 @@ postfix | Piece of text that will always be added to the end of the generated op ``` - "freeform": { - "key": "access:conditional", - "type": "opening_hours", - "helperArgs": [ - { - "prefix":"no @ (", - "postfix":")" - } - ] - }``` +"freeform": { + "key": "access:conditional", + "type": "opening_hours", + "helperArgs": [ + { + "prefix":"no @ (", + "postfix":")" + } + ] +} +``` -*Don't forget to pass these in the rendering as well*: `{opening_hours_table(opening_hours,yes @ &LPARENS, &RPARENS )` +*Don't forget to pass the prefix and postfix in the rendering as well*: `{opening_hours_table(opening_hours,yes @ &LPARENS, &RPARENS )` ## color diff --git a/UI/Input/ValidatedTextField.ts b/UI/Input/ValidatedTextField.ts index 7896b52cd..353851c89 100644 --- a/UI/Input/ValidatedTextField.ts +++ b/UI/Input/ValidatedTextField.ts @@ -59,22 +59,22 @@ class WikidataTextField implements TextFieldDef { \`\`\` "freeform": { - "key": "name:etymology:wikidata", - "type": "wikidata", - "helperArgs": [ - "name", - { - "removePostfixes": [ - "street", - "boulevard", - "path", - "square", - "plaza", - ] - } - ] - } - \`\`\`` + "key": "name:etymology:wikidata", + "type": "wikidata", + "helperArgs": [ + "name", + { + "removePostfixes": [ + "street", + "boulevard", + "path", + "square", + "plaza", + ] + } + ] +} +\`\`\`` ]).AsMarkdown() @@ -154,16 +154,16 @@ class OpeningHoursTextField implements TextFieldDef { ]), new Title("Example usage"), "To add a conditional (based on time) access restriction:\n\n```\n" + ` - "freeform": { - "key": "access:conditional", - "type": "opening_hours", - "helperArgs": [ - { - "prefix":"no @ (", - "postfix":")" - } - ] - }` + "```\n\n*Don't forget to pass these in the rendering as well*: `{opening_hours_table(opening_hours,yes @ &LPARENS, &RPARENS )`"]).AsMarkdown() +"freeform": { + "key": "access:conditional", + "type": "opening_hours", + "helperArgs": [ + { + "prefix":"no @ (", + "postfix":")" + } + ] +}` + "\n```\n\n*Don't forget to pass the prefix and postfix in the rendering as well*: `{opening_hours_table(opening_hours,yes @ &LPARENS, &RPARENS )`"]).AsMarkdown() isValid() {