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

Formatting lost in <details> tag #4084

Closed
5 tasks done
valhuber opened this issue Jul 3, 2022 · 4 comments
Closed
5 tasks done

Formatting lost in <details> tag #4084

valhuber opened this issue Jul 3, 2022 · 4 comments

Comments

@valhuber
Copy link

valhuber commented Jul 3, 2022

Contribution guidelines

I've found a bug and checked that ...

  • ... the problem doesn't occur with the mkdocs or readthedocs themes
  • ... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

I love your product... thanks!

Sorry, I do not understand the first "checkpoint" regarding mkdocs or readthedocs. I have never used them.

I have docs with details tags like this

<details>

<summary>Tests - and their logic - are transparent.. click to see Logic</summary>


&nbsp;
&nbsp;


**Logic Doc** for scenario: Good Order Custom Service
   
We place an Order with an Order Detail.  It's one transaction.

They work fine in standard wiki, but lose the formatting in material-docs.

The wiki link fails badly to take you to the right spot, but this is how that section of the page should look:
details formatting on wiki

And this is how it looks in materials-docs:

details formatiing on material-docs

Expected behaviour

Should preserve formatting - bold, dot points, paragraphs etc.

Actual behaviour

Such formatting is lost

Steps to reproduce

See the code above, which is the same on wiki/material-docs sites.

Package versions

  • Python: python --version

3.10.5

  • MkDocs: mkdocs --version

mkdocs, version 1.3.0 from /Users/val/dev/Docs.AplLogicServer/venv/lib/python3.10/site-packages/mkdocs (Python 3.10)

  • Material: pip show mkdocs-material | grep -E ^Version

Version: 8.3.8

Configuration

https://github.com/valhuber/ApiLogicServer

https://valhuber.github.io/ApiLogicServer/

I am using (I believe, tho a noobie) standards for

* docs folder
* mkdocs.yaml

System information

  • Operating system: ... 12.4
  • Browser: Firefox 102.0
@facelessuser
Copy link
Contributor

This is probably because the content under the block tag <details> is not parsed as Markdown unless the user enables the md_in_hmtl extension.

@squidfunk
Copy link
Owner

Thanks for reporting. You can either use md_in_html, or pymdownx.details to render collapsible blocks, which are implemented with details elements:

with md_in_html:

<details markdown>
  <summary>Title</summary>
  Content
</details>

with pymdownx.details:

??? note "Title"

    Content <!-- All content indented by four spaces -->

@squidfunk
Copy link
Owner

Sorry, I do not understand the first "checkpoint" regarding mkdocs or readthedocs. I have never used them.

I'm in the process of reworking the entire issue-reporting process, as this is one of the things several users are having problems understanding, so no worries.

@valhuber
Copy link
Author

valhuber commented Jul 4, 2022

Thanks, guys... the md_in_html worked great.  Took me a minute to note the <details markdown>, but then fine.

If you need a reference for your project, happy to help.  It has made a spectacular change to the docs... not just visual, but it enables me to communicate the "big picture" using the combination of navigation + table of contents.

Finally, if you are database folks and have a few moments, I'd love to get your reaction to API Logic Server - the doc, and the product.

You can close this issue...

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

3 participants