Code Monkey home page Code Monkey logo

Comments (3)

Dref360 avatar Dref360 commented on June 8, 2024

Unfortunatly, prettier messes up admonitions:

 !!! info "How to temporarily disable pre-commits?"
-    For a specific commit, you can avoid running the pre-commits with the flag `--no-verify`. If you do this, make sure to run `pre-commit run --all-files` before opening a PR, which will run the pre-commit on all files.
-
+For a specific commit, you can avoid running the pre-commits with the flag `--no-verify`. If you do this, make sure to run `pre-commit run --all-files` before opening a PR, which will run the pre-commit on all files.
 

Issues opened:

The fix mentioned (adding a blank line between the !!! and the content) doesn't work on admonitions inside lists.

For future reference, this is the precommit hook I used:

  - repo: local
    hooks:
      - id: prettier-docs
        name: prettier-docs
        language: system
        entry: bash -c 'cd webapp && poetry run yarn prettier --write ../docs'
        files: docs

from azimuth.

gabegma avatar gabegma commented on June 8, 2024

Did you mention yesterday that you found a fix for that? Did you need to install something with yarn first?

from azimuth.

gabegma avatar gabegma commented on June 8, 2024

I tried with another hook and got relatively close to it working, but it doesn't handle complex admonitions with code/bullets/multiple tables in them. I tabled this for now.

  - repo: https://github.com/executablebooks/mdformat
    rev: 0.7.16
    hooks:
      - id: mdformat
        exclude: docs/includes
        additional_dependencies:
          - mdformat-mkdocs
          - mdformat-admon
          - mdformat-beautysh
          - mdformat-footnote
          - mdformat-black
          - mdformat-simple-breaks
          - mdformat-tables

from azimuth.

Related Issues (20)

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.