From 28429df81974ec017016c092c3f88c0efa2f1f13 Mon Sep 17 00:00:00 2001
From: pietervdvn <pietervdvn@posteo.net>
Date: Fri, 29 Oct 2021 03:59:28 +0200
Subject: [PATCH] Documentation Formatting

---
 Docs/SpecialInputElements.md   | 11 ++++++++---
 UI/Input/ValidatedTextField.ts | 12 ++++++++----
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/Docs/SpecialInputElements.md b/Docs/SpecialInputElements.md
index 5a70109de..34e19aba6 100644
--- a/Docs/SpecialInputElements.md
+++ b/Docs/SpecialInputElements.md
@@ -42,7 +42,10 @@ removePostfixes | remove these snippets of text from the end of the passed strin
  
 ### Example usage 
 
- The following is the 'freeform'-part of a layer config which will trigger a search for the wikidata item corresponding with the name of the selected feature. It will also remove '-street', '-square', ... if found at the end of the name```"freeform": {
+ The following is the 'freeform'-part of a layer config which will trigger a search for the wikidata item corresponding with the name of the selected feature. It will also remove '-street', '-square', ... if found at the end of the name
+
+```
+"freeform": {
                 "key": "name:etymology:wikidata",
                 "type": "wikidata",
                 "helperArgs": [
@@ -57,7 +60,8 @@ removePostfixes | remove these snippets of text from the end of the passed strin
                         ]
                     }
                 ]
-            },```
+            }
+            ```
 
 ## int
 
@@ -113,6 +117,7 @@ postfix | Piece of text that will always be added to the end of the generated op
  To add a conditional (based on time) access restriction:
 
 ```
+
             "freeform": {
                 "key": "access:conditional",
                 "type": "opening_hours",
@@ -122,7 +127,7 @@ postfix | Piece of text that will always be added to the end of the generated op
                       "postfix":")"
                     }
                 ]
-            },```
+            }```
 
 *Don't forget to pass these in the rendering as well*: `{opening_hours_table(opening_hours,yes @ &LPARENS, &RPARENS )`
 
diff --git a/UI/Input/ValidatedTextField.ts b/UI/Input/ValidatedTextField.ts
index 75cf02e69..7896b52cd 100644
--- a/UI/Input/ValidatedTextField.ts
+++ b/UI/Input/ValidatedTextField.ts
@@ -55,7 +55,10 @@ class WikidataTextField implements TextFieldDef {
                         )])
                     ]]),
             new Title("Example usage"),
-            "The following is the 'freeform'-part of a layer config which will trigger a search for the wikidata item corresponding with the name of the selected feature. It will also remove '-street', '-square', ... if found at the end of the name```" + `"freeform": {
+            `The following is the 'freeform'-part of a layer config which will trigger a search for the wikidata item corresponding with the name of the selected feature. It will also remove '-street', '-square', ... if found at the end of the name
+
+\`\`\`
+"freeform": {
                 "key": "name:etymology:wikidata",
                 "type": "wikidata",
                 "helperArgs": [
@@ -70,7 +73,8 @@ class WikidataTextField implements TextFieldDef {
                         ]
                     }
                 ]
-            },` + "```"
+            }
+            \`\`\``
         ]).AsMarkdown()
 
 
@@ -149,7 +153,7 @@ class OpeningHoursTextField implements TextFieldDef {
                     ]
                 ]),
             new Title("Example usage"),
-            "To add a conditional (based on time) access restriction:\n\n```" + `
+            "To add a conditional (based on time) access restriction:\n\n```\n" + `
             "freeform": {
                 "key": "access:conditional",
                 "type": "opening_hours",
@@ -159,7 +163,7 @@ class OpeningHoursTextField implements TextFieldDef {
                       "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*Don't forget to pass these in the rendering as well*: `{opening_hours_table(opening_hours,yes @ &LPARENS, &RPARENS )`"]).AsMarkdown()
 
 
     isValid() {