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

Custom extras #519

Merged
merged 33 commits into from
Feb 25, 2024
Merged

Custom extras #519

merged 33 commits into from
Feb 25, 2024

Commits on Mar 13, 2023

  1. Custom extras initial proof of concept.

    The way this works is by creating subclasses of the `Extra` class. These subclasses will have an order and a name. The name is the same one
    specified in the `extras` list/dict given to the Markdown init function.
    
    The order will be at which point the function will be executed. This is done by attaching the extra to a "Stage", a distinct step in the
    markdown process (eg: forming paragraphs, processing links... etc). You can set the extra to run before or after the stage.
    
    At the moment, extras are automatically registered, activated and executed by the Markdown class.
    
    TODO:
    * More elegant way to register and init extras
    * Optimise `Stage.mark`
    * Convert more extras to new class format
    Crozzers committed Mar 13, 2023
    Configuration menu
    Copy the full SHA
    07789a2 View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2023

  1. Configuration menu
    Copy the full SHA
    aad9e33 View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2023

  1. Merge branch 'master' into custom-extras

    Stay up to date with master
    Crozzers committed Apr 23, 2023
    Configuration menu
    Copy the full SHA
    d3efe1e View commit details
    Browse the repository at this point in the history

Commits on May 23, 2023

  1. Convert femced-code-blocks extra to new Extra format.

    Also converted `mermaid` extra as part of this process. As a plus,
    you no longer need fenced-code-blocks activated to use mermaid.
    
    Also added the ability for extras to be triggered before or after another extra
    Crozzers committed May 23, 2023
    Configuration menu
    Copy the full SHA
    212131b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    26ae9a5 View commit details
    Browse the repository at this point in the history
  3. Add some docstrings

    Crozzers committed May 23, 2023
    Configuration menu
    Copy the full SHA
    f4b3d66 View commit details
    Browse the repository at this point in the history
  4. Convert tables and wiki-tables extras to new format.

    All block extras have now been converted
    Crozzers committed May 23, 2023
    Configuration menu
    Copy the full SHA
    283fcdf View commit details
    Browse the repository at this point in the history

Commits on May 25, 2023

  1. Configuration menu
    Copy the full SHA
    cb1fd28 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e460b2e View commit details
    Browse the repository at this point in the history
  3. Convert span extras to new format.

    Still TODO is things like `footnotes` extra.
    Also need to think of a system for extras to replace parts of the standard syntax
    Crozzers committed May 25, 2023
    Configuration menu
    Copy the full SHA
    ad7a3ff View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2023

  1. Merge branch 'master' into custom-extras.

    Merge master to pull in trentm#514 for conversion to new Extra format
    Crozzers committed Jul 2, 2023
    Configuration menu
    Copy the full SHA
    8a3fdcf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a2d8baa View commit details
    Browse the repository at this point in the history
  3. Fix failing Python 3.6 tests due to missing re.Match class.

    Also fix tests not running on Windows
    Crozzers committed Jul 2, 2023
    Configuration menu
    Copy the full SHA
    262d7ff View commit details
    Browse the repository at this point in the history
  4. Drop Python 3.5 support.

    At time of commit, Python 3.5 is 2 years 9 months EOL.
    Crozzers committed Jul 2, 2023
    Configuration menu
    Copy the full SHA
    cb05bdc View commit details
    Browse the repository at this point in the history
  5. Update changes.md

    Crozzers committed Jul 2, 2023
    Configuration menu
    Copy the full SHA
    666ebef View commit details
    Browse the repository at this point in the history
  6. Fix wavedrom tests

    Crozzers committed Jul 2, 2023
    Configuration menu
    Copy the full SHA
    8eb13b4 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5478960 View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2023

  1. Merge branch 'master' of https://github.com/trentm/python-markdown2 i…

    …nto custom-extras
    
    Resolve merge conflicts for PR
    Crozzers committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    1682d6f View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2023

  1. Configuration menu
    Copy the full SHA
    7751098 View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2023

  1. Add order attribute to Markdown class.

    Allows extras to check exactly when they've been triggered - before or after certain stages
    Crozzers committed Aug 19, 2023
    Configuration menu
    Copy the full SHA
    6233ea1 View commit details
    Browse the repository at this point in the history
  2. Fix extra options being replaced if falsey.

    Remove unneeded type hints
    Crozzers committed Aug 19, 2023
    Configuration menu
    Copy the full SHA
    a63343d View commit details
    Browse the repository at this point in the history
  3. Convert code-friendly and middle-word-em extras to new format.

    Ended up implementing a `ItalicsAndBoldProcessor` ABC extra class for both
    to piggy-back off of. Works by hashing text that we don't want processed and then doing nothing
    with the other text. Hashed text is then replaced after I&B has run
    Crozzers committed Aug 19, 2023
    Configuration menu
    Copy the full SHA
    fcaadfe View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2023

  1. Merge branch 'master' into custom-extras

    Resolve merge conflicts for PR
    Crozzers committed Sep 24, 2023
    Configuration menu
    Copy the full SHA
    eaa4544 View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2023

  1. Merge branch 'master' into custom-extras

    Resolve merge conflicts for PR
    Crozzers committed Nov 7, 2023
    Configuration menu
    Copy the full SHA
    bf2bec3 View commit details
    Browse the repository at this point in the history

Commits on Dec 1, 2023

  1. Merge branch 'master' into custom-extras

    Merge master to resolve PR conflicts
    Crozzers committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    4353751 View commit details
    Browse the repository at this point in the history

Commits on Dec 17, 2023

  1. Merge branch 'master' into custom-extras

    Resolve PR conflicts
    Crozzers committed Dec 17, 2023
    Configuration menu
    Copy the full SHA
    fc33019 View commit details
    Browse the repository at this point in the history

Commits on Jan 3, 2024

  1. Merge branch 'master' into custom-extras

    Resolve conflicts for PR
    Crozzers committed Jan 3, 2024
    Configuration menu
    Copy the full SHA
    4373eb3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c269ccf View commit details
    Browse the repository at this point in the history
  3. Fix changelog after merge

    Crozzers committed Jan 3, 2024
    Configuration menu
    Copy the full SHA
    cc34905 View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2024

  1. Merge branch 'master' into custom-extras

    Merge recent changes to `breaks` functionality
    Crozzers committed Jan 6, 2024
    Configuration menu
    Copy the full SHA
    a9fb886 View commit details
    Browse the repository at this point in the history

Commits on Jan 27, 2024

  1. Refactor extras ordering system to use lists rather than number based…

    … ordering
    
    Lists let us have a theoreticaly infinite number of extras registered, with no overflowing into the next stage
    Crozzers committed Jan 27, 2024
    Configuration menu
    Copy the full SHA
    123b6a9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    66d7e4f View commit details
    Browse the repository at this point in the history

Commits on Jan 28, 2024

  1. Configuration menu
    Copy the full SHA
    b41ca8f View commit details
    Browse the repository at this point in the history