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

[BUG] Markdown diffs not displayed for specific input #1086

Open
oshiteku opened this issue Feb 19, 2025 · 1 comment
Open

[BUG] Markdown diffs not displayed for specific input #1086

oshiteku opened this issue Feb 19, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@oshiteku
Copy link

Describe the bug

Differences between files are not displayed even though there are actual differences.

To Reproduce

  1. Create the following two files:

    a.md

    # (aaa)

    b.md

    # (bbb)
  2. Run diffsitter to compare the files:

    $ diffsitter a.md b.md
    a.md -> b.md
    ============
  3. Observe that no differences are displayed.

Expected behavior

The tool should display the differences between the two files, but no output is shown.

Log output/screenshots

output with the --debug flag:

Details

 2025-02-19T16:35:40.412Z DEBUG diffsitter > Checking if a.md can be parsed
 2025-02-19T16:35:40.412Z INFO  libdiffsitter::parse > Deduced language "markdown" from extension "md" from default mappings
 2025-02-19T16:35:40.412Z DEBUG diffsitter           > Deduced language markdown for path a.md
 2025-02-19T16:35:40.412Z DEBUG diffsitter           > Checking if b.md can be parsed
 2025-02-19T16:35:40.412Z INFO  libdiffsitter::parse > Deduced language "markdown" from extension "md" from default mappings
 2025-02-19T16:35:40.412Z DEBUG diffsitter           > Deduced language markdown for path b.md
 2025-02-19T16:35:40.412Z DEBUG libdiffsitter        > Reading a.md to string
 2025-02-19T16:35:40.412Z INFO  libdiffsitter        > Will deduce filetype from file extension
 2025-02-19T16:35:40.412Z INFO  libdiffsitter::parse > Deduced language "markdown" from extension "md" from default mappings
 2025-02-19T16:35:40.412Z INFO  libdiffsitter::parse > Using tree-sitter parser for language markdown
 2025-02-19T16:35:40.412Z INFO  libdiffsitter::parse > Succeeded loading grammar for markdown
 2025-02-19T16:35:40.412Z DEBUG libdiffsitter::parse > Parsed AST
 2025-02-19T16:35:40.412Z INFO  TimerFinished        > parse::parse_file(), Elapsed=50.598µs
 2025-02-19T16:35:40.412Z DEBUG libdiffsitter        > Reading b.md to string
 2025-02-19T16:35:40.412Z INFO  libdiffsitter        > Will deduce filetype from file extension
 2025-02-19T16:35:40.412Z INFO  libdiffsitter::parse > Deduced language "markdown" from extension "md" from default mappings
 2025-02-19T16:35:40.412Z INFO  libdiffsitter::parse > Using tree-sitter parser for language markdown
 2025-02-19T16:35:40.412Z INFO  libdiffsitter::parse > Succeeded loading grammar for markdown
 2025-02-19T16:35:40.412Z DEBUG libdiffsitter::parse > Parsed AST
 2025-02-19T16:35:40.412Z INFO  TimerFinished        > parse::parse_file(), Elapsed=18.165µs
 2025-02-19T16:35:40.412Z INFO  TimerFinished        > ast::from_ts_tree(), Elapsed=3.47µs
 2025-02-19T16:35:40.412Z INFO  TimerFinished        > ast::process(), Elapsed=11.218µs
 2025-02-19T16:35:40.412Z INFO  TimerFinished        > ast::from_ts_tree(), Elapsed=1.646µs
 2025-02-19T16:35:40.412Z INFO  TimerFinished        > ast::process(), Elapsed=4.014µs
 2025-02-19T16:35:40.412Z INFO  TimerFinished        > diff::compute_edit_script(), Elapsed=3.949µs
 2025-02-19T16:35:40.412Z INFO  libdiffsitter::render::unified > Using stack style horizontal for title
a.md -> b.md
============

Platform:

  • OS: Ubuntu 24.04
  • diffsitter version: 0.8.4
@oshiteku oshiteku added the bug Something isn't working label Feb 19, 2025
@oshiteku
Copy link
Author

This issue doesn't seem to depend on parentheses.

The same problem occurs even with simple inputs that include symbols like comparisons between a? and b?.

@afnanenayet afnanenayet self-assigned this Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants