From 589c19c952c3b0143d6e5db1aa2cd7df8e8c3915 Mon Sep 17 00:00:00 2001 From: longtv2222 Date: Fri, 26 Jan 2024 03:57:21 -0700 Subject: [PATCH] docs(lambda): log group docs not being rendered properly (#28871) TSDoc for `logGroup` is not being rendered properly due to the use of `<` and `>`. This affects Vscode: ![Screenshot 2024-01-25 164442](https://github.com/aws/aws-cdk/assets/61606375/9db93b8c-dcbc-437e-8c07-a5f6b30c99b7) And `aws-cdk-lib` docs as well: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html#loggroup ![Screenshot 2024-01-25 164752](https://github.com/aws/aws-cdk/assets/61606375/a924353e-f5c2-4355-80d8-b511bb6488a3) Fixed by escaping `<` and `>` properly This is probably caused by `<` is interpreted as opening `JSX` tags by `MDX`. After fix: ![Screenshot 2024-01-25 165425](https://github.com/aws/aws-cdk/assets/61606375/c40c225b-cfac-4cf8-a102-832bc5f00213) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/aws-cdk-lib/aws-lambda/lib/function.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-lambda/lib/function.ts b/packages/aws-cdk-lib/aws-lambda/lib/function.ts index e705ff70858ad..e3b8a1bde981a 100644 --- a/packages/aws-cdk-lib/aws-lambda/lib/function.ts +++ b/packages/aws-cdk-lib/aws-lambda/lib/function.ts @@ -477,7 +477,7 @@ export interface FunctionOptions extends EventInvokeConfigOptions { /** * The log group the function sends logs to. * - * By default, Lambda functions send logs to an automatically created default log group named /aws/lambda/. + * By default, Lambda functions send logs to an automatically created default log group named /aws/lambda/\. * However you cannot change the properties of this auto-created log group using the AWS CDK, e.g. you cannot set a different log retention. * * Use the `logGroup` property to create a fully customizable LogGroup ahead of time, and instruct the Lambda function to send logs to it.