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

Heading auto identifier #175

Open
wants to merge 35 commits into
base: master
Choose a base branch
from

Commits on Mar 30, 2022

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

Commits on Apr 3, 2022

  1. Implement identifier transformation like github

    This imply scanning and transforming the heading text.
    As the heading text is transformed, we need to stor it somewhere.
    Instead of doing almost one malloc for each heading, allocate a large
    buffer and store all indentifier inside, and using index.
    
    We also remember the heading in the header Block to later retrieve it.
    chowette committed Apr 3, 2022
    Configuration menu
    Copy the full SHA
    340f15c View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2022

  1. Fix : garbage can occur in large file.

    Do not hold pointer to reallocated memory. Realloc can copy to a
    new location and our pointers are now invalid.
    memorize the offset in the buffer instead, this remain valid even after
    reallochas relocated the buffer
    chowette committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    5513c81 View commit details
    Browse the repository at this point in the history
  2. no need to trim space when building identifiers.

    the block line(s) is always trimed when build
    chowette committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    9215d87 View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2022

  1. convert uppercase unicode identifier into lower case

    like `ΑΓΩ` is changed to `αγω`
    chowette committed Apr 6, 2022
    Configuration menu
    Copy the full SHA
    5351400 View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2022

  1. First proof of concept for duplicate identifier case

    It works but need more work because
    - bad O(n²) algorithm to be replaced by a hash[Map|Set]
    - use snprintf for simple int_to_str implementation
    chowette committed Apr 7, 2022
    Configuration menu
    Copy the full SHA
    d253fc3 View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2022

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

Commits on Apr 11, 2022

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

Commits on Apr 12, 2022

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

Commits on Apr 23, 2022

  1. Configuration menu
    Copy the full SHA
    7812fdb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3738b8a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2f3ff6f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f572773 View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2022

  1. fix use of wrong macro

     ISUNICODEPUNCT_() use a codepoint not an offset. use ISPUNCT_()
    chowette committed Apr 26, 2022
    Configuration menu
    Copy the full SHA
    12ccd2f View commit details
    Browse the repository at this point in the history
  2. remove unused struct MD_POSTFIX_DEF_tag

    some indentation cleaning
    chowette committed Apr 26, 2022
    Configuration menu
    Copy the full SHA
    138a104 View commit details
    Browse the repository at this point in the history
  3. Change how struct MD_REF_DEF store dest:

    Use a pointer and a size instead of begining and ending index.
    We need a pointer because we want to store the heading
    identifier as destination, but the identifier is not part of the
    initial ctx->txt buffer. This is done like the `title`
    We also cascade change the `MD_LINK_ATTR` struct and supporting functions
    chowette committed Apr 26, 2022
    Configuration menu
    Copy the full SHA
    5d8a7e9 View commit details
    Browse the repository at this point in the history
  4. extract reference definition

    so we can reuse it for heading
    chowette committed Apr 26, 2022
    Configuration menu
    Copy the full SHA
    1ecb4b8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2d15e71 View commit details
    Browse the repository at this point in the history
  6. store the heading

    chowette committed Apr 26, 2022
    Configuration menu
    Copy the full SHA
    ada2e65 View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2022

  1. add flag MD_FLAG_HEADINGAUTOID doc

    +typo
    chowette committed Oct 14, 2022
    Configuration menu
    Copy the full SHA
    74f3e4b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6bfc91d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1ec0845 View commit details
    Browse the repository at this point in the history
  4. store the heading level

    chowette committed Oct 14, 2022
    Configuration menu
    Copy the full SHA
    1eb9b06 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    36bb1e9 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2022

  1. Add TOC option to the parser parameter struct

    - depth for toc output
    - Increase the abi_version to 1
    - add --table-of-content option to md2html
    - add --toc-depth=x to limit TOC levels
    chowette committed Oct 16, 2022
    Configuration menu
    Copy the full SHA
    8738b1e View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2022

  1. add optional table of content place holder MARK

    --table-of -content option has a parameter to set the mark
    --toc is a shorthand for the --table-of-content option
    
    wrong TOC depth is now an error
    chowette committed Oct 19, 2022
    Configuration menu
    Copy the full SHA
    bc98da4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3d4fc52 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    643423b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    001494b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1ee979f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3fca919 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d4f99b2 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f2fab2e View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2022

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