Commit Graph

22 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 a81a5161df update test data 2023-01-17 14:18:36 -08: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
aq17 b91126065b Update YAML invoke syntax for docs 2022-11-04 11:39:24 -07:00
susanev 15854c4bf7 regen docs tests
Signed-off-by: susanev <susan.ra.evans@gmail.com>
2022-09-17 12:28:11 -07:00
Ian Wahbe 6db525c91d
Add external enums all languages ()
* Enable tests for all languages

* Enable go to work around ungenerated types

This relies on the resource `.pkg` field bieng accurate. Since this is
not the case, we need to make it accurate. I will do this in a seperate
PR since it is invasive.

* Include type references in schema types

* Fix lint

* Generate the correct pkg

* Check if we generated the external type

* Fix enum tests

* Perform the same change for outputs

* Cache global analysis
2022-07-06 11:35:31 -07:00
Kyle Dixler 378daccaec
updated codegen () 2022-05-26 19:50:52 -05:00
Christian Nunciato 70e30c95b4
Fix the function template to show YAML under the YAML tab ()
* Fix function template to show YAML under the YAML tab
* Update template baselines
2022-05-06 16:19:25 -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