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

Fast ANSI string operations in C #316

Merged
merged 54 commits into from
Aug 4, 2021
Merged

Fast ANSI string operations in C #316

merged 54 commits into from
Aug 4, 2021

Commits on Jul 8, 2021

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

Commits on Jul 9, 2021

  1. Improve ANSI operations

    * Omit empty tags now.
    * Better color representation.
    gaborcsardi committed Jul 9, 2021
    Configuration menu
    Copy the full SHA
    dc45041 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bd5cfd5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8bb3cec View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2021

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

Commits on Jul 12, 2021

  1. Configuration menu
    Copy the full SHA
    4515742 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ca4faff View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9011045 View commit details
    Browse the repository at this point in the history
  4. Speed up ansi_substr()

    gaborcsardi committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    65ab59d View commit details
    Browse the repository at this point in the history
  5. Add minimal docs to ansi_simplify()

    Plus the output classes as well.
    gaborcsardi committed Jul 12, 2021
    Configuration menu
    Copy the full SHA
    3e2c2b3 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    493deed View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2021

  1. Improve parsing ANSI colors

    Especially broken color sequences.
    gaborcsardi committed Jul 13, 2021
    Configuration menu
    Copy the full SHA
    787b37f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f9f6f56 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b860504 View commit details
    Browse the repository at this point in the history
  4. Handle SGR off tag better

    We only emit it if there was an unkown SGR tag
    in the input. Otherwise we use the more specific
    closing tags.
    gaborcsardi committed Jul 13, 2021
    Configuration menu
    Copy the full SHA
    7ee0ad9 View commit details
    Browse the repository at this point in the history
  5. Better handling of ANSI 0m, well formed color tags

    * Now we always close a color tag, before we
      start another one.
    * 0m is now only emitted when there was an
      unknown SGR tag before.
    gaborcsardi committed Jul 13, 2021
    Configuration menu
    Copy the full SHA
    f793146 View commit details
    Browse the repository at this point in the history
  6. More ANSI test cases

    gaborcsardi committed Jul 13, 2021
    Configuration menu
    Copy the full SHA
    91ff798 View commit details
    Browse the repository at this point in the history
  7. ANSI manipulation: support bright colors

    Also simplify data structure of colors, just store
    the color number directly, we are using 254 and 255
    for 256 and RGB color, anyway.
    gaborcsardi committed Jul 13, 2021
    Configuration menu
    Copy the full SHA
    a8b9b5b View commit details
    Browse the repository at this point in the history
  8. ANSI manipulation: emit well-formed tags.

    I.e. <t1><t2>...</t2></t1> instead of
    <t1><t2>...</t1></t2>.
    gaborcsardi committed Jul 13, 2021
    Configuration menu
    Copy the full SHA
    71b8806 View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2021

  1. Add ansi_html()

    Plus helper function for CSS and also ansi_simplify().
    gaborcsardi committed Jul 15, 2021
    Configuration menu
    Copy the full SHA
    9eb32aa View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4d9be35 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2021

  1. Slight ANSI iterator speedup

    When there are no tags.
    gaborcsardi committed Jul 16, 2021
    Configuration menu
    Copy the full SHA
    cecb043 View commit details
    Browse the repository at this point in the history
  2. Rewrite ansi_has_any() with iterator

    It does not currently find hyperlink seqs...
    gaborcsardi committed Jul 16, 2021
    Configuration menu
    Copy the full SHA
    2511461 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    323ab81 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    92c8574 View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2021

  1. Configuration menu
    Copy the full SHA
    9026196 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a842da1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d13aca8 View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2021

  1. Proper UTF-8 graphemes in width measurement

    Coming to the other functions as well...
    gaborcsardi committed Jul 19, 2021
    Configuration menu
    Copy the full SHA
    daeab9c View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2021

  1. ANSI functions force UTF-8 now

    They convert to UTF-8 on input, always return UTF-8.
    gaborcsardi committed Jul 20, 2021
    Configuration menu
    Copy the full SHA
    a6ed5db View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    274a02d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7fe6360 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a96155c View commit details
    Browse the repository at this point in the history
  5. Fix ANSI code on older R versions

    `LENGTH(NULL)` does not seems to work well on
    R 3.4 and before.
    gaborcsardi committed Jul 20, 2021
    Configuration menu
    Copy the full SHA
    cfe4fee View commit details
    Browse the repository at this point in the history
  6. Use graphemes in ansi_nchar()

    Also add `utf8_nchar()`.
    
    Towards #317.
    gaborcsardi committed Jul 20, 2021
    Configuration menu
    Copy the full SHA
    5e92e5e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f962704 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d8474d6 View commit details
    Browse the repository at this point in the history
  9. Some ANSI test cases

    gaborcsardi committed Jul 20, 2021
    Configuration menu
    Copy the full SHA
    3a883ae View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2021

  1. Do not try to kill the thread twice

    The second might happen after the DLL was unloaded,
    e.g. in testthatlabs, I am not sure why.
    gaborcsardi committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    18cb66a View commit details
    Browse the repository at this point in the history
  2. Message when flushing coverage info

    It is nice to see that it is happening.
    gaborcsardi committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    5bfac89 View commit details
    Browse the repository at this point in the history
  3. Rename capture_messages() test helper

    To avoid name clash with testthat.
    gaborcsardi committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    ca6f5e5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    98d93f8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    30d9231 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    db5134b View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    53398ed View commit details
    Browse the repository at this point in the history
  8. Substrings using grapheme clusters

    `ansi_substr()` and `ansi_substring()` uses this now,
    and the new `utf8_substr()` function as well.
    The latter is slightly faster, but it does not work
    for ANSI styled strings.
    gaborcsardi committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    757c9cf View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2021

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

Commits on Aug 3, 2021

  1. Add unnamed-chunk-1.svg

    Some chunks in the docs create this, and
    it is very small, so it is simpler to just
    include it.
    gaborcsardi committed Aug 3, 2021
    Configuration menu
    Copy the full SHA
    b2ebe86 View commit details
    Browse the repository at this point in the history
  2. Update snapshots

    For simplified ANSI sequences.
    gaborcsardi committed Aug 3, 2021
    Configuration menu
    Copy the full SHA
    33296c1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    99c564c View commit details
    Browse the repository at this point in the history
  4. Add utf8_* functions to the pkgdown reference

    IDK how and when they were removed...
    gaborcsardi committed Aug 3, 2021
    Configuration menu
    Copy the full SHA
    84d09e1 View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2021

  1. Note that style_hyperlink() is experimental.

    And that ansi_* functions do not handle it.
    gaborcsardi committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    1c9ccd9 View commit details
    Browse the repository at this point in the history
  2. Add utf8_graphemes()

    gaborcsardi committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    a169b5e View commit details
    Browse the repository at this point in the history
  3. Fix broken example

    gaborcsardi committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    a9e458d View commit details
    Browse the repository at this point in the history