api-manager
api-manager copied to clipboard
Markdown Document Code Block Truncation Issue in API Documentation Viewer
Description
When adding a Markdown document in the document section of an API, if a code block contains a long single-line value, the value gets cut off when viewed in the normal view. This issue affects the readability and usability of the documentation.
Steps to Reproduce
- Create a Markdown document with the following content:
# Sample Markdown Document
This is a simple markdown document designed to showcase how a long code block can be integrated within the content.
## Introduction
Markdown is a lightweight markup language that you can use to add formatting elements to plaintext text documents. GitHub, StackOverflow, and many other sites use markdown for their documentation.
## Example of a Long JSON Code Block
Below is an example of a long JSON code block, which could represent a configuration file, API response, or any other structured data:
```json
{
"project": {
"name": "Sample Project",
"version": "1.0.0",
"description": "This is a sample project to demonstrate a long JSON code block in markdown. where it contains a single line attribute with high number of characters to showcase the issue with how the UI cutover the value when it is viewed from the normal view",
"author": "Abshan",
"license": "MIT",
"dependencies": {
"express": "^4.17.1",
"mongoose": "^5.9.7",
"cors": "^2.8.5"
},
"scripts": {
"start": "node app.js",
"test": "jest",
"lint": "eslint ."
}
}
}
- Add this Markdown document to the document section of an API in WSO2.
- View the document from the normal view.
Affected Component
APIM
Version
4.1.0
Environment Details (with versions)
No response
Relevant Log Output
No response
Related Issues
No response
Suggested Labels
No response