Function: codeBlock()
codeBlock(content)
codeBlock<
C
>(content
:C
): ```` ${C} ````
Wraps the content inside a codeblock with no language
Type Parameters
Type Parameter |
---|
C extends string |
Parameters
Parameter | Type |
---|---|
content | C |
Returns
```` ${C} ````
Remark
If the provided content includes 3 backticks (```) then those backticks will be escaped by adding a Zero Width Space between the first and second backtick
@remark If the provided content ends with a backtick then a Zero Width Space will be added to the end of the content
@param content - The content to wrap
Defined in
codeBlock(language, content)
codeBlock<
L
,C
>(language
:L
,content
:C
): ````${L} ${C} ````
Wraps the content inside a codeblock with the specified language
Type Parameters
Type Parameter |
---|
L extends string |
C extends string |
Parameters
Parameter | Type |
---|---|
language | L |
content | C |
Returns
````${L} ${C} ````
Remark
If the provided content includes 3 backticks (```) then those backticks will be escaped by adding a Zero Width Space between the first and second backtick
@remark If the provided content ends with a backtick then a Zero Width Space will be added to the end of the content
@param language The codeblock language @param content The expression to be wrapped in the codeblock