Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collection description not formatting #29

Open
JasonPoll opened this issue Jun 29, 2023 · 0 comments
Open

Collection description not formatting #29

JasonPoll opened this issue Jun 29, 2023 · 0 comments

Comments

@JasonPoll
Copy link

First, thank you for postman-doc-gen, it's saved me a lot of time.

I'm wondering if there is any reason to not have the overall collection description markdown converted to HTML?

For my own purposes, I made this small modification to postman_doc_gen/document_generator.py and the top-level collection description converted from markdown to HTML as desired:

--- a/postman_doc_gen/document_generator.py
+++ b/postman_doc_gen/document_generator.py
@@ -53,7 +53,7 @@ class DocumentGenerator:
         self.api_collection = APICollectionModel()
 
         self.api_collection.name = json_collection[INFO][NAME]
-        self.api_collection.description = json_collection[INFO].get(DESCRIPTION, '')
+        self.api_collection.description = self.markdown_to_html(json_collection[INFO].get(DESCRIPTION, ''))
         self.api_collection.schema = json_collection[INFO][SCHEMA]
         self.api_collection.file_name = os.path.basename(collection_file_name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant