Giter VIP home page Giter VIP logo

mdformat-admon's People

Contributors

hukkin avatar kyleking avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mdformat-admon's Issues

Latest `mdformat-admon` and `mdformat-gfm` conflicts

Trying to install the last 2 versions of these plugins does not work because of a conflict on mdit-py-plugins requirements:

$ pip install --dry-run mdformat-gfm==0.3.5 mdformat-admon==1.0.2
Collecting mdformat-gfm==0.3.5
  Using cached mdformat_gfm-0.3.5-py3-none-any.whl (4.9 kB)
Collecting mdformat-admon==1.0.2
  Using cached mdformat_admon-1.0.2-py3-none-any.whl (4.7 kB)
Collecting markdown-it-py[linkify] (from mdformat-gfm==0.3.5)
  Using cached markdown_it_py-3.0.0-py3-none-any.whl (87 kB)
Collecting mdformat<0.8.0,>=0.7.5 (from mdformat-gfm==0.3.5)
  Using cached mdformat-0.7.16-py3-none-any.whl (29 kB)
Collecting mdformat-tables>=0.4.0 (from mdformat-gfm==0.3.5)
  Using cached mdformat_tables-0.4.1-py3-none-any.whl (4.6 kB)
Collecting mdit-py-plugins<0.4.0,>=0.2.0 (from mdformat-gfm==0.3.5)
  Using cached mdit_py_plugins-0.3.5-py3-none-any.whl (52 kB)
INFO: pip is looking at multiple versions of mdformat-admon to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install mdformat-admon==1.0.2 and mdformat-gfm==0.3.5 because these package versions have conflicting dependencies.

The conflict is caused by:
    mdformat-gfm 0.3.5 depends on mdit-py-plugins<0.4.0 and >=0.2.0
    mdformat-admon 1.0.2 depends on mdit-py-plugins>=0.4.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

Mirrors: hukkin/mdformat-gfm#27

How to use the admon plugin through the mdformat api?

Other plugins can be used with the api (see the example below), but if I try to use mdformat-admon I get error:
plugin = mdformat.plugins.PARSER_EXTENSIONS[name]
KeyError: 'admon'

import mdformat

mdformat.text(
        content,
        options={"wrap": 80, "end-of-line": "keep"},
        extensions={
            "gfm",
            "tables",
            "footnote",
            "frontmatter",
            "configblack",
            "mkdocs",
        },
        codeformatters={
            "python",
            "bash",
            "sh",
            "json",
            "toml",
            "yaml",
            "javascript",
            "js",
            "css",
            "html",
            "xml",
        },
)

versions:
mdformat==0.7.16
mdformat-admon==1.0.0

Thanks

Errors in admonitions with code blocks

@KyleKing I'm trying to use this plugin with our docs at https://docs.ultralytics.com, and it creates incorrect output on adminitions that contain code blocks:

Before running

Ultralytics commands use the following syntax:

!!! Example

    === "CLI"

        ```bash
        yolo TASK MODE ARGS
        ```

    === "Python"

        ```python
        from ultralytics import YOLO

        # Load a YOLOv8 model from a pre-trained weights file
        model = YOLO('yolov8n.pt')

        # Run MODE mode using the custom arguments ARGS (guess TASK)
        model.MODE(ARGS)
        ```

After running

Ultralytics commands use the following syntax:

!!! Example
    === "CLI"

    ````
    ```bash
    yolo TASK MODE ARGS
    ```
    ````

    === "Python"

    ````
    ```python
    from ultralytics import YOLO

    # Load a YOLOv8 model from a pre-trained weights file
    model = YOLO('yolov8n.pt')

    # Run MODE mode using the custom arguments ARGS (guess TASK)
    model.MODE(ARGS)
    ```
    ````

The file that has this to reproduce the issue is at https://github.com/ultralytics/ultralytics/blob/main/docs/en/usage/cfg.md with mdformat cfg.md --wrap no

Could you take a look please and see if there is a fix that's possible? Thank you!

Content tabs

Hi,

I've been using your plugin and it has been working great with Mkdocs and Material style admonitions. However, in my project I also use content tabs (https://squidfunk.github.io/mkdocs-material/reference/content-tabs) which are extremely similar to admonitions.

I've forked your repository and figured out that the only change would be to add === in the MARKERS tuple and corresponding tests. But, this made me realise that there would be so much code in common.

I am not sure how to approach this as you have already fully integrated this plugin and the name of does not really correspond to the content tabs. Do you have any suggestions or ideas? I would be more than happy to contribute.

Support for `???` and `???+` doesn't look to be in 1.0.2?

First off, thanks for this project. Was just about to give up on mdformat for a project of mine until I found your plugin work here in executablebooks/mdformat#309.

Looking at the release page for 1.0.2, it mentions that 1.0.2 fixes #9.

However, looking at the commits to main since that tag, we see 282ca53, which corresponds to #13, i.e. precisely the PR that resolves #9.

So it sounds like the fix for #9 is in fact not in 1.0.2, and could use a follow-up release? ๐Ÿ˜…

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.