swagger-api / swagger-api/swagger-ui
Support for extending markdown interpreter
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
| Q | A |
|---|---|
| Bug or feature request? | Feature request |
| Which Swagger/OpenAPI version? | - |
| Which Swagger-UI version? | 3.13.0 |
| How did you install Swagger-UI? | git clone |
| Which browser & version? | - |
| Which operating system? | - |
Expected Behavior
I'd like to be able to extend Remarkable with custom configuration/plugins (https://github.com/jonschlinkert/remarkable/blob/master/docs/plugins.md).
Current Behavior
Remarkable is completely instantiated and consumed within the context of the Markdown provider, without passing in any configuration sources.
Possible Solution
Allow configuration options to be passed to Remarkable via a property of the Swagger UI configuration object.
Context
I'm attempting to use a plugin to render specific code-fenced blocks using an external library, instead of rendering them as per standard. As they are rendered within the Markdown flow (and rendered to escaped HTML before I can intercept), I am unable to do so.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Markdown provider, where Remarkable is instantiated and consumed, then review the Swagger UI configuration object and Remarkable's plugin documentation. Done means configuration can pass Remarkable options or plugins through Swagger UI so custom rendering of fenced code blocks occurs before the output is escaped.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100