Skip to content

Conversation

@t-kalinowski
Copy link
Contributor

Markdown does not support links in pre-formatted code blocks.

With the current release, markitdown mangles code chunks by generating links.

For example: markitdown https://r4ds.hadley.nz/base-r will generate code chunks that look like this:

```
# Left
[hist](https://rdrr.io/r/graphics/hist.html)(diamonds$carat)

# Right
[plot](https://rdrr.io/r/graphics/plot.default.html)(diamonds$carat, diamonds$price)
```

With this patch, the same code chunk is now correctly generated

```
# Left
hist(diamonds$carat)

# Right
plot(diamonds$carat, diamonds$price)
```

@afourney
Copy link
Member

Nice find. Thanks for the PR.

We should add a test for this to avoid regressing. But it's simple enough that we can add tests in another PR.

@afourney afourney merged commit 3a5ca22 into microsoft:main Feb 11, 2025
3 checks passed
t-kalinowski added a commit to tidyverse/ragnar that referenced this pull request Feb 16, 2025
- contains fix for `pre` microsoft/markitdown#322
- DocumentConverterResult moved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants