Formatting fix

This commit is contained in:
pietervdvn 2021-10-29 13:35:33 +02:00
parent 28429df819
commit 2d5d3fbd96
2 changed files with 54 additions and 53 deletions

View file

@ -46,22 +46,22 @@ removePostfixes | remove these snippets of text from the end of the passed strin
``` ```
"freeform": { "freeform": {
"key": "name:etymology:wikidata", "key": "name:etymology:wikidata",
"type": "wikidata", "type": "wikidata",
"helperArgs": [ "helperArgs": [
"name", "name",
{ {
"removePostfixes": [ "removePostfixes": [
"street", "street",
"boulevard", "boulevard",
"path", "path",
"square", "square",
"plaza", "plaza",
] ]
} }
] ]
} }
``` ```
## int ## int
@ -118,18 +118,19 @@ postfix | Piece of text that will always be added to the end of the generated op
``` ```
"freeform": { "freeform": {
"key": "access:conditional", "key": "access:conditional",
"type": "opening_hours", "type": "opening_hours",
"helperArgs": [ "helperArgs": [
{ {
"prefix":"no @ (", "prefix":"no @ (",
"postfix":")" "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 ## color

View file

@ -59,22 +59,22 @@ class WikidataTextField implements TextFieldDef {
\`\`\` \`\`\`
"freeform": { "freeform": {
"key": "name:etymology:wikidata", "key": "name:etymology:wikidata",
"type": "wikidata", "type": "wikidata",
"helperArgs": [ "helperArgs": [
"name", "name",
{ {
"removePostfixes": [ "removePostfixes": [
"street", "street",
"boulevard", "boulevard",
"path", "path",
"square", "square",
"plaza", "plaza",
] ]
} }
] ]
} }
\`\`\`` \`\`\``
]).AsMarkdown() ]).AsMarkdown()
@ -154,16 +154,16 @@ class OpeningHoursTextField implements TextFieldDef {
]), ]),
new Title("Example usage"), new Title("Example usage"),
"To add a conditional (based on time) access restriction:\n\n```\n" + ` "To add a conditional (based on time) access restriction:\n\n```\n" + `
"freeform": { "freeform": {
"key": "access:conditional", "key": "access:conditional",
"type": "opening_hours", "type": "opening_hours",
"helperArgs": [ "helperArgs": [
{ {
"prefix":"no @ (", "prefix":"no @ (",
"postfix":")" "postfix":")"
} }
] ]
}` + "```\n\n*Don't forget to pass these in the rendering as well*: `{opening_hours_table(opening_hours,yes @ &LPARENS, &RPARENS )`"]).AsMarkdown() }` + "\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() { isValid() {