Commit Graph

19 Commits

Author SHA1 Message Date
Justin Van Patten 7162491d0b
[docsgen] Fix rendering of deprecated messages and text in description lists ()
A change was made a while back to remove the use of shortcodes. As part
of that, the shortcode used to render markdown was replaced by a
function call that used goldmark to render markdown. The resulting HTML
from that wraps the text in paragraph tags.

This causes some problems for rendering the docs. For deprecations, the
deprecation message now shows up outside of the "Deprecated" box. This
happens because the rendered markdown was being wrapped in `<p></p>`
tags, leading to `<p class="resource-deprecated">Deprecated:
<p>message</p></p>`, which does not render correctly because paragraph
tags cannot be nested.

Also, in description lists, rendered markdown text was being wrapped in
paragraph tags (e.g. `<dd><p>text</p></dd>`), causing it to render
differently from text not wrapped in paragraph tags (e.g.
`<dd>text</dd>`).

This change addresses these issues.

- First, `<div class="resource-deprecated">` is used rather than `<p>`
to contain the deprecation information.

- Second, the `markdownify` function will now trim unnecessary paragraph
tags.

Fixes https://github.com/pulumi/pulumi-hugo/issues/2832
Fixes https://github.com/pulumi/registry/issues/3008

---

## Before

<img width="713" alt="Screen Shot 2023-08-24 at 5 21 44 PM"
src="https://github.com/pulumi/pulumi/assets/710598/1358cc74-dd8a-4bc0-bed8-603b1439b2aa">

## After

<img width="721" alt="Screen Shot 2023-08-24 at 5 21 58 PM"
src="https://github.com/pulumi/pulumi/assets/710598/ad501e68-1bac-486c-a723-7db2b3442c8a">

## Before

<img width="719" alt="Screen Shot 2023-08-24 at 5 22 28 PM"
src="https://github.com/pulumi/pulumi/assets/710598/6ca40b85-9008-429b-83c3-2f0d681752f3">

## After

<img width="714" alt="Screen Shot 2023-08-24 at 5 24 02 PM"
src="https://github.com/pulumi/pulumi/assets/710598/eec1dacf-8c24-470e-b1e3-da843b4aeaee">
2023-08-26 17:36:28 +00:00
Christian Nunciato 2a883b106f Regenerate test docs 2023-08-10 14:13:40 -07:00
susanev 61732b69e4
update tests
Signed-off-by: susanev <susan.ra.evans@gmail.com>
2023-06-09 14:15:22 -04:00
Sean Holung 13e0ebef62 test 2023-01-17 10:22:12 -08:00
Sean Holung d2ac92ceab regen docs tests 2023-01-13 15:38:34 -08:00
Sean Holung 24e722143f
Revert "Update package details anchor tags" 2023-01-13 11:16:29 -08:00
Sean Holung 69457364f5
regen docs tests 2023-01-12 14:11:04 -08:00
susanev 0d336e5fa9 remove slash from resource options anchors
Signed-off-by: susanev <susan.ra.evans@gmail.com>
2022-12-07 10:43:26 -08:00
susanev 11168f0036 remove slash from anchors
Signed-off-by: susanev <susan.ra.evans@gmail.com>
2022-12-07 10:40:42 -08:00
susanev ce63439609 fixing mistakes maybe
Signed-off-by: susanev <susan.ra.evans@gmail.com>
2022-12-06 15:20:18 -08:00
susanev f75326519d adding slash to gen dot go
Signed-off-by: susanev <susan.ra.evans@gmail.com>
2022-12-06 15:08:22 -08:00
susanev 15854c4bf7 regen docs tests
Signed-off-by: susanev <susan.ra.evans@gmail.com>
2022-09-17 12:28:11 -07:00
Kyle Dixler 378daccaec
updated codegen () 2022-05-26 19:50:52 -05:00
Ian Wahbe b281b482dc
Pass through resource replacement in the schema ()
* Pass through resource replacement in the schema

* Add property

* Ignore files in .pytest_cache

* Remove .pytest_cache files

* Add a test + Fix
2022-05-17 13:59:47 -07:00
Mikhail Shilkov 1066ce6ff5 Update docs testdata 2022-05-04 10:00:53 +02:00
Christian Nunciato e462b78a74
Fix Node.js properties template () 2022-05-01 10:25:12 -07:00
Christian Nunciato 0a0f48e292
Replace Hugo shortcodes () 2022-04-29 15:04:15 -07:00
Kimberley Mackenzie 421d062e8f
Add data attribute tag for swifttype to resource property element ()
* Add data attribute tag for swifttype to resource property element.

* Update test data.
2022-03-21 10:36:04 -07:00
Ian Wahbe a1e18dae4d
export codegen tests for internal use ()
* Export Codegen test modules

* Document pkg stability guarantee

* Expose programgen

* Recommendation: Improve wording

* Move `internal` to `testing`

* Re-rout references to codegen/internal

* Fix some other "internal" references
2022-02-07 12:10:04 +01:00