Skip to content

Commit 0d9c320

Browse files
k-rabedblanchette
andauthored
fix(Markdown): Fix rendering of deprecated properties in MD (#295)
* Fix rendering of deprecated properties in MD A leading whitespace prevents deprecated properties to be rendered strikedthrough in Markdown. This can be avoided by positioning the whitespace as trailing in the conditionals. * Restore fixed whitespace after batch in MD Previously, there was a trailing whitespace after the batch. A fixed whitespace is added to restore this rendering. * Re-add separator at required indicator in MD * Update generated examples --------- Co-authored-by: Denis Blanchette <[email protected]>
1 parent 18b2640 commit 0d9c320

File tree

14 files changed

+82
-82
lines changed

14 files changed

+82
-82
lines changed

docs/examples/examples_md_default/Configuration.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
- [19.4.1. JSON Schema for Humans configuration file > template_md_options > properties_table_columns > properties_table_columns items](#template_md_options_properties_table_columns_items)
2727
- [20. Property `JSON Schema for Humans configuration file > with_footer`](#with_footer)
2828
- [21. Property `JSON Schema for Humans configuration file > footer_show_time`](#footer_show_time)
29-
- [22. ~~ Property `JSON Schema for Humans configuration file > allow_html_description`~~](#allow_html_description)
30-
- [23. ~~ Property `JSON Schema for Humans configuration file > minify`~~](#minify)
31-
- [24. ~~ Property `JSON Schema for Humans configuration file > templates_directory`~~](#templates_directory)
29+
- [22. ~~Property `JSON Schema for Humans configuration file > allow_html_description`~~](#allow_html_description)
30+
- [23. ~~Property `JSON Schema for Humans configuration file > minify`~~](#minify)
31+
- [24. ~~Property `JSON Schema for Humans configuration file > templates_directory`~~](#templates_directory)
3232

3333
**Title:** JSON Schema for Humans configuration file
3434

@@ -425,7 +425,7 @@ Must be one of:
425425

426426
**Description:** Whether the footer should display the generation time
427427

428-
## <a name="allow_html_description"></a>22. ~~ Property `JSON Schema for Humans configuration file > allow_html_description`~~
428+
## <a name="allow_html_description"></a>22. ~~Property `JSON Schema for Humans configuration file > allow_html_description`~~
429429

430430
| | |
431431
| -------------- | --------- |
@@ -436,7 +436,7 @@ Must be one of:
436436

437437
**Description:** [Deprecated]
438438

439-
## <a name="minify"></a>23. ~~ Property `JSON Schema for Humans configuration file > minify`~~
439+
## <a name="minify"></a>23. ~~Property `JSON Schema for Humans configuration file > minify`~~
440440

441441
| | |
442442
| -------------- | --------- |
@@ -447,7 +447,7 @@ Must be one of:
447447

448448
**Description:** [Deprecated]
449449

450-
## <a name="templates_directory"></a>24. ~~ Property `JSON Schema for Humans configuration file > templates_directory`~~
450+
## <a name="templates_directory"></a>24. ~~Property `JSON Schema for Humans configuration file > templates_directory`~~
451451

452452
| | |
453453
| -------------- | -------- |

docs/examples/examples_md_default/deprecated.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Schema Docs
22

3-
- [1. ~~ Property `root > deprecated1`~~](#deprecated1)
4-
- [2. ~~ Property `root > deprecated2`~~](#deprecated2)
5-
- [3. ~~ Property `root > deprecated3`~~](#deprecated3)
6-
- [4. ~~ Property `root > deprecated4`~~](#deprecated4)
3+
- [1. ~~Property `root > deprecated1`~~](#deprecated1)
4+
- [2. ~~Property `root > deprecated2`~~](#deprecated2)
5+
- [3. ~~Property `root > deprecated3`~~](#deprecated3)
6+
- [4. ~~Property `root > deprecated4`~~](#deprecated4)
77
- [5. Property `root > not_deprecated`](#not_deprecated)
88

99
| | |
@@ -22,7 +22,7 @@
2222
| - [deprecated4](#deprecated4 ) | No | object | Deprecated | - | This is [Deprecated - Use \`not_deprecated\` instead] |
2323
| - [not_deprecated](#not_deprecated ) | No | string | No | - | - |
2424

25-
## <a name="deprecated1"></a>1. ~~ Property `root > deprecated1`~~
25+
## <a name="deprecated1"></a>1. ~~Property `root > deprecated1`~~
2626

2727
| | |
2828
| ------------------------- | ---------------- |
@@ -33,7 +33,7 @@
3333

3434
**Description:** [Deprecated]
3535

36-
## <a name="deprecated2"></a>2. ~~ Property `root > deprecated2`~~
36+
## <a name="deprecated2"></a>2. ~~Property `root > deprecated2`~~
3737

3838
| | |
3939
| ------------------------- | ---------------- |
@@ -44,7 +44,7 @@
4444

4545
**Description:** [Deprecated - Use `not_deprecated` instead]
4646

47-
## <a name="deprecated3"></a>3. ~~ Property `root > deprecated3`~~
47+
## <a name="deprecated3"></a>3. ~~Property `root > deprecated3`~~
4848

4949
| | |
5050
| ------------------------- | ---------------- |
@@ -55,7 +55,7 @@
5555

5656
**Description:** This is [Deprecated]
5757

58-
## <a name="deprecated4"></a>4. ~~ Property `root > deprecated4`~~
58+
## <a name="deprecated4"></a>4. ~~Property `root > deprecated4`~~
5959

6060
| | |
6161
| ------------------------- | ---------------- |

docs/examples/examples_md_nested_default/Configuration.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
- [19.4.1. JSON Schema for Humans configuration file > template_md_options > properties_table_columns > properties_table_columns items](#autogenerated_heading_2)
2727
- [20. [Optional] Property JSON Schema for Humans configuration file > with_footer](#with_footer)
2828
- [21. [Optional] Property JSON Schema for Humans configuration file > footer_show_time](#footer_show_time)
29-
- [22. [Optional]~~ Property JSON Schema for Humans configuration file > allow_html_description~~](#allow_html_description)
30-
- [23. [Optional]~~ Property JSON Schema for Humans configuration file > minify~~](#minify)
31-
- [24. [Optional]~~ Property JSON Schema for Humans configuration file > templates_directory~~](#templates_directory)
29+
- [22. [Optional] ~~Property JSON Schema for Humans configuration file > allow_html_description~~](#allow_html_description)
30+
- [23. [Optional] ~~Property JSON Schema for Humans configuration file > minify~~](#minify)
31+
- [24. [Optional] ~~Property JSON Schema for Humans configuration file > templates_directory~~](#templates_directory)
3232

3333
**Title:** JSON Schema for Humans configuration file
3434

@@ -593,7 +593,7 @@ Must be one of:
593593

594594
<details>
595595
<summary>
596-
<strong> <a name="allow_html_description"></a>22. [Optional]~~ Property JSON Schema for Humans configuration file > allow_html_description~~</strong>
596+
<strong> <a name="allow_html_description"></a>22. [Optional] ~~Property JSON Schema for Humans configuration file > allow_html_description~~</strong>
597597

598598
</summary>
599599
<blockquote>
@@ -612,7 +612,7 @@ Must be one of:
612612

613613
<details>
614614
<summary>
615-
<strong> <a name="minify"></a>23. [Optional]~~ Property JSON Schema for Humans configuration file > minify~~</strong>
615+
<strong> <a name="minify"></a>23. [Optional] ~~Property JSON Schema for Humans configuration file > minify~~</strong>
616616

617617
</summary>
618618
<blockquote>
@@ -631,7 +631,7 @@ Must be one of:
631631

632632
<details>
633633
<summary>
634-
<strong> <a name="templates_directory"></a>24. [Optional]~~ Property JSON Schema for Humans configuration file > templates_directory~~</strong>
634+
<strong> <a name="templates_directory"></a>24. [Optional] ~~Property JSON Schema for Humans configuration file > templates_directory~~</strong>
635635

636636
</summary>
637637
<blockquote>

docs/examples/examples_md_nested_default/deprecated.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Schema Docs
22

3-
- [1. [Optional]~~ Property root > deprecated1~~](#deprecated1)
4-
- [2. [Optional]~~ Property root > deprecated2~~](#deprecated2)
5-
- [3. [Optional]~~ Property root > deprecated3~~](#deprecated3)
6-
- [4. [Optional]~~ Property root > deprecated4~~](#deprecated4)
3+
- [1. [Optional] ~~Property root > deprecated1~~](#deprecated1)
4+
- [2. [Optional] ~~Property root > deprecated2~~](#deprecated2)
5+
- [3. [Optional] ~~Property root > deprecated3~~](#deprecated3)
6+
- [4. [Optional] ~~Property root > deprecated4~~](#deprecated4)
77
- [5. [Optional] Property root > not_deprecated](#not_deprecated)
88

99
| | |
@@ -16,7 +16,7 @@
1616

1717
<details>
1818
<summary>
19-
<strong> <a name="deprecated1"></a>1. [Optional]~~ Property root > deprecated1~~</strong>
19+
<strong> <a name="deprecated1"></a>1. [Optional] ~~Property root > deprecated1~~</strong>
2020

2121
</summary>
2222
<blockquote>
@@ -35,7 +35,7 @@
3535

3636
<details>
3737
<summary>
38-
<strong> <a name="deprecated2"></a>2. [Optional]~~ Property root > deprecated2~~</strong>
38+
<strong> <a name="deprecated2"></a>2. [Optional] ~~Property root > deprecated2~~</strong>
3939

4040
</summary>
4141
<blockquote>
@@ -54,7 +54,7 @@
5454

5555
<details>
5656
<summary>
57-
<strong> <a name="deprecated3"></a>3. [Optional]~~ Property root > deprecated3~~</strong>
57+
<strong> <a name="deprecated3"></a>3. [Optional] ~~Property root > deprecated3~~</strong>
5858

5959
</summary>
6060
<blockquote>
@@ -73,7 +73,7 @@
7373

7474
<details>
7575
<summary>
76-
<strong> <a name="deprecated4"></a>4. [Optional]~~ Property root > deprecated4~~</strong>
76+
<strong> <a name="deprecated4"></a>4. [Optional] ~~Property root > deprecated4~~</strong>
7777

7878
</summary>
7979
<blockquote>

docs/examples/examples_md_nested_default/pattern_properties.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
- [1. [Optional] Property Person > firstName](#firstName)
44
- [2. [Optional] Property Person > lastName](#lastName)
5-
- [3. [Optional]Pattern Property Person > paperSize](#pattern1)
5+
- [3. [Optional] Pattern Property Person > paperSize](#pattern1)
66
- [3.1. [Required] Property Person > paperSize > rating](#pattern1_rating)
77
- [3.2. [Required] Property Person > paperSize > review](#pattern1_review)
88

@@ -54,7 +54,7 @@
5454

5555
<details>
5656
<summary>
57-
<strong> <a name="pattern1"></a>3. [Optional]Pattern Property Person > paperSize</strong>
57+
<strong> <a name="pattern1"></a>3. [Optional] Pattern Property Person > paperSize</strong>
5858
> All properties whose name matches the regular expression
5959
```$[a-c][0-9]^``` ([Test](https://regex101.com/?regex=%24%5Ba-c%5D%5B0-9%5D%5E))
6060
must respect the following conditions

docs/examples/examples_md_nested_default/pattern_properties_html_id.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Person
22

33
- [1. [Optional] Property Person > not_a_pattern](#not_a_pattern)
4-
- [1.1. [Optional]Pattern Property Person > not_a_pattern > Title 4](#not_a_pattern_pattern1)
5-
- [2. [Optional]Pattern Property Person > Title 1](#pattern1)
6-
- [3. [Optional]Pattern Property Person > Title 2](#pattern2)
7-
- [4. [Optional]Pattern Property Person > Title 3](#pattern3)
4+
- [1.1. [Optional] Pattern Property Person > not_a_pattern > Title 4](#not_a_pattern_pattern1)
5+
- [2. [Optional] Pattern Property Person > Title 1](#pattern1)
6+
- [3. [Optional] Pattern Property Person > Title 2](#pattern2)
7+
- [4. [Optional] Pattern Property Person > Title 3](#pattern3)
88

99
**Title:** Person
1010

@@ -29,7 +29,7 @@
2929

3030
<details>
3131
<summary>
32-
<strong> <a name="not_a_pattern_pattern1"></a>1.1. [Optional]Pattern Property Person > not_a_pattern > Title 4</strong>
32+
<strong> <a name="not_a_pattern_pattern1"></a>1.1. [Optional] Pattern Property Person > not_a_pattern > Title 4</strong>
3333
> All properties whose name matches the regular expression
3434
```.$``` ([Test](https://regex101.com/?regex=.%24))
3535
must respect the following conditions
@@ -55,7 +55,7 @@ must respect the following conditions
5555

5656
<details>
5757
<summary>
58-
<strong> <a name="pattern1"></a>2. [Optional]Pattern Property Person > Title 1</strong>
58+
<strong> <a name="pattern1"></a>2. [Optional] Pattern Property Person > Title 1</strong>
5959
> All properties whose name matches the regular expression
6060
```.*``` ([Test](https://regex101.com/?regex=.%2A))
6161
must respect the following conditions
@@ -78,7 +78,7 @@ must respect the following conditions
7878

7979
<details>
8080
<summary>
81-
<strong> <a name="pattern2"></a>3. [Optional]Pattern Property Person > Title 2</strong>
81+
<strong> <a name="pattern2"></a>3. [Optional] Pattern Property Person > Title 2</strong>
8282
> All properties whose name matches the regular expression
8383
```..``` ([Test](https://regex101.com/?regex=..))
8484
must respect the following conditions
@@ -101,7 +101,7 @@ must respect the following conditions
101101

102102
<details>
103103
<summary>
104-
<strong> <a name="pattern3"></a>4. [Optional]Pattern Property Person > Title 3</strong>
104+
<strong> <a name="pattern3"></a>4. [Optional] Pattern Property Person > Title 3</strong>
105105
> All properties whose name matches the regular expression
106106
```^.``` ([Test](https://regex101.com/?regex=%5E.))
107107
must respect the following conditions

docs/examples/examples_md_nested_with_badges/Configuration.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
- [19.4.1. JSON Schema for Humans configuration file > template_md_options > properties_table_columns > properties_table_columns items](#autogenerated_heading_2)
2727
- [20. [Optional] Property JSON Schema for Humans configuration file > with_footer](#with_footer)
2828
- [21. [Optional] Property JSON Schema for Humans configuration file > footer_show_time](#footer_show_time)
29-
- [22. [Optional]~~ Property JSON Schema for Humans configuration file > allow_html_description~~](#allow_html_description)
30-
- [23. [Optional]~~ Property JSON Schema for Humans configuration file > minify~~](#minify)
31-
- [24. [Optional]~~ Property JSON Schema for Humans configuration file > templates_directory~~](#templates_directory)
29+
- [22. [Optional] ~~Property JSON Schema for Humans configuration file > allow_html_description~~](#allow_html_description)
30+
- [23. [Optional] ~~Property JSON Schema for Humans configuration file > minify~~](#minify)
31+
- [24. [Optional] ~~Property JSON Schema for Humans configuration file > templates_directory~~](#templates_directory)
3232

3333
**Title:** JSON Schema for Humans configuration file
3434

@@ -566,7 +566,7 @@ Must be one of:
566566

567567
<details>
568568
<summary>
569-
<strong> <a name="allow_html_description"></a>22. [Optional]~~ Property JSON Schema for Humans configuration file > allow_html_description~~</strong>
569+
<strong> <a name="allow_html_description"></a>22. [Optional] ~~Property JSON Schema for Humans configuration file > allow_html_description~~</strong>
570570

571571
</summary>
572572
<blockquote>
@@ -585,7 +585,7 @@ Must be one of:
585585

586586
<details>
587587
<summary>
588-
<strong> <a name="minify"></a>23. [Optional]~~ Property JSON Schema for Humans configuration file > minify~~</strong>
588+
<strong> <a name="minify"></a>23. [Optional] ~~Property JSON Schema for Humans configuration file > minify~~</strong>
589589

590590
</summary>
591591
<blockquote>
@@ -604,7 +604,7 @@ Must be one of:
604604

605605
<details>
606606
<summary>
607-
<strong> <a name="templates_directory"></a>24. [Optional]~~ Property JSON Schema for Humans configuration file > templates_directory~~</strong>
607+
<strong> <a name="templates_directory"></a>24. [Optional] ~~Property JSON Schema for Humans configuration file > templates_directory~~</strong>
608608

609609
</summary>
610610
<blockquote>

docs/examples/examples_md_nested_with_badges/deprecated.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Schema Docs
22

3-
- [1. [Optional]~~ Property root > deprecated1~~](#deprecated1)
4-
- [2. [Optional]~~ Property root > deprecated2~~](#deprecated2)
5-
- [3. [Optional]~~ Property root > deprecated3~~](#deprecated3)
6-
- [4. [Optional]~~ Property root > deprecated4~~](#deprecated4)
3+
- [1. [Optional] ~~Property root > deprecated1~~](#deprecated1)
4+
- [2. [Optional] ~~Property root > deprecated2~~](#deprecated2)
5+
- [3. [Optional] ~~Property root > deprecated3~~](#deprecated3)
6+
- [4. [Optional] ~~Property root > deprecated4~~](#deprecated4)
77
- [5. [Optional] Property root > not_deprecated](#not_deprecated)
88

99
| | |
@@ -15,7 +15,7 @@
1515

1616
<details>
1717
<summary>
18-
<strong> <a name="deprecated1"></a>1. [Optional]~~ Property root > deprecated1~~</strong>
18+
<strong> <a name="deprecated1"></a>1. [Optional] ~~Property root > deprecated1~~</strong>
1919

2020
</summary>
2121
<blockquote>
@@ -34,7 +34,7 @@
3434

3535
<details>
3636
<summary>
37-
<strong> <a name="deprecated2"></a>2. [Optional]~~ Property root > deprecated2~~</strong>
37+
<strong> <a name="deprecated2"></a>2. [Optional] ~~Property root > deprecated2~~</strong>
3838

3939
</summary>
4040
<blockquote>
@@ -53,7 +53,7 @@
5353

5454
<details>
5555
<summary>
56-
<strong> <a name="deprecated3"></a>3. [Optional]~~ Property root > deprecated3~~</strong>
56+
<strong> <a name="deprecated3"></a>3. [Optional] ~~Property root > deprecated3~~</strong>
5757

5858
</summary>
5959
<blockquote>
@@ -72,7 +72,7 @@
7272

7373
<details>
7474
<summary>
75-
<strong> <a name="deprecated4"></a>4. [Optional]~~ Property root > deprecated4~~</strong>
75+
<strong> <a name="deprecated4"></a>4. [Optional] ~~Property root > deprecated4~~</strong>
7676

7777
</summary>
7878
<blockquote>

docs/examples/examples_md_nested_with_badges/pattern_properties.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
- [1. [Optional] Property Person > firstName](#firstName)
44
- [2. [Optional] Property Person > lastName](#lastName)
5-
- [3. [Optional]Pattern Property Person > paperSize](#pattern1)
5+
- [3. [Optional] Pattern Property Person > paperSize](#pattern1)
66
- [3.1. [Required] Property Person > paperSize > rating](#pattern1_rating)
77
- [3.2. [Required] Property Person > paperSize > review](#pattern1_review)
88

@@ -51,7 +51,7 @@
5151

5252
<details>
5353
<summary>
54-
<strong> <a name="pattern1"></a>3. [Optional]Pattern Property Person > paperSize</strong>
54+
<strong> <a name="pattern1"></a>3. [Optional] Pattern Property Person > paperSize</strong>
5555
> All properties whose name matches the regular expression
5656
```$[a-c][0-9]^``` ([Test](https://regex101.com/?regex=%24%5Ba-c%5D%5B0-9%5D%5E))
5757
must respect the following conditions

0 commit comments

Comments
 (0)