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

Use same limit for refdef as inline links #854

Conversation

notriddle
Copy link
Collaborator

@notriddle notriddle commented Mar 1, 2024

Fixes #853

https://spec.commonmark.org/0.31.2/#link-reference-definitions

A link reference definition consists of a link label, optionally preceded by up to three spaces of indentation, followed by a colon (:), optional spaces or tabs (including up to one line ending), a link destination, optional spaces or tabs (including up to one line ending), and an optional link title, which if it is present must be separated from the link destination by spaces or tabs. No further character may occur.

https://spec.commonmark.org/0.31.2/#link-destination

A link destination consists of either

  • a sequence of zero or more characters between an opening < and a closing > that contains no line endings or unescaped < or > characters, or
  • a nonempty sequence of characters that does not start with <, does not include ASCII control characters or space character, and includes parentheses only if (a) they are backslash-escaped or (b) they are part of a balanced pair of unescaped parentheses. (Implementations may impose limits on parentheses nesting to avoid performance issues, but at least three levels of nesting should be supported.)

https://spec.commonmark.org/0.31.2/#link-reference-definitions

> A link reference definition consists of a link label, optionally
> preceded by up to three spaces of indentation, followed by a
> colon (`:`), optional spaces or tabs (including up to one line
> ending), a **link destination**, optional spaces or tabs
> (including up to one line ending), and an optional link title,
> which if it is present must be separated from the link
> destination by spaces or tabs. No further character may occur.

https://spec.commonmark.org/0.31.2/#link-destination

> A link destination consists of either
>
> - a sequence of zero or more characters between an opening `<`
>   and a closing `>` that contains no line endings or unescaped
>   `<` or `>` characters, or
> - a nonempty sequence of characters that does not start
>   with `<`, does not include ASCII control characters or space
>   character, and includes parentheses only if (a) they are
>   backslash-escaped or (b) they are part of a balanced pair of
>   unescaped parentheses. (Implementations may impose limits on
>   parentheses nesting to avoid performance issues, but **at
>   least three levels of nesting** should be supported.)
@Martin1887 Martin1887 merged commit 3525d2a into pulldown-cmark:master Mar 2, 2024
1 check passed
@notriddle notriddle deleted the notriddle/issue-853-deeply-nested-parens branch March 2, 2024 13:45
bors added a commit to rust-lang/cargo that referenced this pull request Apr 2, 2024
chore(deps): update compatible

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [anyhow](https://togithub.com/dtolnay/anyhow) | workspace.dependencies | patch | `1.0.80` -> `1.0.81` |
| [clap](https://togithub.com/clap-rs/clap) | workspace.dependencies | patch | `4.5.1` -> `4.5.4` |
| [git2](https://togithub.com/rust-lang/git2-rs) | workspace.dependencies | patch | `0.18.2` -> `0.18.3` |
| [handlebars](https://togithub.com/sunng87/handlebars-rust) | workspace.dependencies | patch | `5.1.0` -> `5.1.2` |
| [libloading](https://togithub.com/nagisa/rust_libloading) | workspace.dependencies | patch | `0.8.1` -> `0.8.3` |
| [memchr](https://togithub.com/BurntSushi/memchr) | workspace.dependencies | patch | `2.7.1` -> `2.7.2` |
| [os_info](https://togithub.com/stanislav-tkach/os_info) | workspace.dependencies | minor | `3.7.0` -> `3.8.2` |
| [pulldown-cmark](https://togithub.com/raphlinus/pulldown-cmark) | workspace.dependencies | patch | `0.10.0` -> `0.10.2` |
| [regex](https://togithub.com/rust-lang/regex) | workspace.dependencies | patch | `1.10.3` -> `1.10.4` |
| [security-framework](https://lib.rs/crates/security_framework) ([source](https://togithub.com/kornelski/rust-security-framework)) | workspace.dependencies | minor | `2.9.2` -> `2.10.0` |
| [serde_json](https://togithub.com/serde-rs/json) | workspace.dependencies | patch | `1.0.114` -> `1.0.115` |
| [similar](https://togithub.com/mitsuhiko/similar) | dev-dependencies | minor | `2.4.0` -> `2.5.0` |
| [snapbox](https://togithub.com/assert-rs/trycmd/tree/main/crates/snapbox) ([source](https://togithub.com/assert-rs/trycmd)) | workspace.dependencies | patch | `0.5.7` -> `0.5.9` |
| [thiserror](https://togithub.com/dtolnay/thiserror) | workspace.dependencies | patch | `1.0.57` -> `1.0.58` |
| [toml](https://togithub.com/toml-rs/toml) | workspace.dependencies | patch | `0.8.10` -> `0.8.12` |
| [tracing-chrome](https://togithub.com/thoren-d/tracing-chrome) | workspace.dependencies | patch | `0.7.1` -> `0.7.2` |
| [walkdir](https://togithub.com/BurntSushi/walkdir) | workspace.dependencies | minor | `2.4.0` -> `2.5.0` |

---

### Release Notes

<details>
<summary>dtolnay/anyhow (anyhow)</summary>

### [`v1.0.81`](https://togithub.com/dtolnay/anyhow/releases/tag/1.0.81)

[Compare Source](https://togithub.com/dtolnay/anyhow/compare/1.0.80...1.0.81)

-   Make backtrace support available when using -Dwarnings ([#&#8203;354](https://togithub.com/dtolnay/anyhow/issues/354))

</details>

<details>
<summary>clap-rs/clap (clap)</summary>

### [`v4.5.4`](https://togithub.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#454---2024-03-25)

[Compare Source](https://togithub.com/clap-rs/clap/compare/v4.5.3...v4.5.4)

##### Fixes

-   *(derive)* Allow non-literal `#[arg(id)]` attributes again

### [`v4.5.3`](https://togithub.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#453---2024-03-15)

[Compare Source](https://togithub.com/clap-rs/clap/compare/v4.5.2...v4.5.3)

##### Internal

-   *(derive)* Update `heck`

### [`v4.5.2`](https://togithub.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#452---2024-03-06)

[Compare Source](https://togithub.com/clap-rs/clap/compare/v4.5.1...v4.5.2)

##### Fixes

-   *(macros)* Silence a warning

</details>

<details>
<summary>rust-lang/git2-rs (git2)</summary>

### [`v0.18.3`](https://togithub.com/rust-lang/git2-rs/blob/HEAD/CHANGELOG.md#0183---2024-03-18)

[Compare Source](https://togithub.com/rust-lang/git2-rs/compare/git2-0.18.2...git2-0.18.3)

[0.18.2...0.18.3](https://togithub.com/rust-lang/git2-rs/compare/git2-0.18.2...git2-0.18.3)

##### Added

-   Added `opts::` functions to get / set libgit2 mwindow options
    [#&#8203;1035](https://togithub.com/rust-lang/git2-rs/pull/1035)

##### Changed

-   Updated examples to use clap instead of structopt
    [#&#8203;1007](https://togithub.com/rust-lang/git2-rs/pull/1007)

</details>

<details>
<summary>sunng87/handlebars-rust (handlebars)</summary>

### [`v5.1.2`](https://togithub.com/sunng87/handlebars-rust/blob/HEAD/CHANGELOG.md#512---2024-03-24)

[Compare Source](https://togithub.com/sunng87/handlebars-rust/compare/v5.1.1...v5.1.2)

-   \[Changed] Improved error message and syntax rule naming \[[#&#8203;638](https://togithub.com/sunng87/handlebars-rust/issues/638)]
-   \[Changed] Updated `heck` to 0.5 \[[#&#8203;635](https://togithub.com/sunng87/handlebars-rust/issues/635)]

### [`v5.1.1`](https://togithub.com/sunng87/handlebars-rust/blob/HEAD/CHANGELOG.md#-511---2024-01-18-Yanked)

[Compare Source](https://togithub.com/sunng87/handlebars-rust/compare/v5.1.0...v5.1.1)

-   \[Changed] Turned off pub access of `chain` in `HelperTemplate`

</details>

<details>
<summary>nagisa/rust_libloading (libloading)</summary>

### [`v0.8.3`](https://togithub.com/nagisa/rust_libloading/compare/0.8.2...0.8.3)

[Compare Source](https://togithub.com/nagisa/rust_libloading/compare/0.8.2...0.8.3)

### [`v0.8.2`](https://togithub.com/nagisa/rust_libloading/compare/0.8.1...0.8.2)

[Compare Source](https://togithub.com/nagisa/rust_libloading/compare/0.8.1...0.8.2)

</details>

<details>
<summary>BurntSushi/memchr (memchr)</summary>

### [`v2.7.2`](https://togithub.com/BurntSushi/memchr/compare/2.7.1...2.7.2)

[Compare Source](https://togithub.com/BurntSushi/memchr/compare/2.7.1...2.7.2)

</details>

<details>
<summary>stanislav-tkach/os_info (os_info)</summary>

### [`v3.8.2`](https://togithub.com/stanislav-tkach/os_info/blob/HEAD/CHANGELOG.md#382-2024-03-22)

[Compare Source](https://togithub.com/stanislav-tkach/os_info/compare/v3.8.1...v3.8.2)

-   Build on FreeSBD has been fixed once again. ([#&#8203;377](https://togithub.com/stanislav-tkach/os_info/issues/377))

### [`v3.8.1`](https://togithub.com/stanislav-tkach/os_info/blob/HEAD/CHANGELOG.md#381-2024-03-17)

[Compare Source](https://togithub.com/stanislav-tkach/os_info/compare/v3.8.0...v3.8.1)

-   Build on FreeSBD has been fixed. ([#&#8203;372](https://togithub.com/stanislav-tkach/os_info/issues/372))

-   Build on Illumos has been fixed. ([#&#8203;373](https://togithub.com/stanislav-tkach/os_info/issues/373))

-   Build on NetBSD has been fixed. ([#&#8203;374](https://togithub.com/stanislav-tkach/os_info/issues/374))

-   Few more regressions introduced in the `3.8.0` release were (hopefully) fixed.

### [`v3.8.0`](https://togithub.com/stanislav-tkach/os_info/blob/HEAD/CHANGELOG.md#380-2024-03-12)

[Compare Source](https://togithub.com/stanislav-tkach/os_info/compare/v3.7.0...v3.8.0)

-   The `windows-sys` crate instead of `winapi` is now used internally. ([#&#8203;341](https://togithub.com/stanislav-tkach/os_info/issues/341))

-   Architecture information for Windows targets has been added. ([#&#8203;345](https://togithub.com/stanislav-tkach/os_info/issues/345))

-   Artix Linux detection has been fixed. ([#&#8203;348](https://togithub.com/stanislav-tkach/os_info/issues/348))

-   AIX support has been added. ([#&#8203;349](https://togithub.com/stanislav-tkach/os_info/issues/349))

-   Kali Linux support has been added. ([#&#8203;350](https://togithub.com/stanislav-tkach/os_info/issues/350))

-   openSUSE Tumbleweed detection has been fixed. ([#&#8203;353](https://togithub.com/stanislav-tkach/os_info/issues/353))

-   Version parsing from `lsb_release` has been added. ([#&#8203;354](https://togithub.com/stanislav-tkach/os_info/issues/354))

-   HardenedBSD detection has been fixed. ([#&#8203;358](https://togithub.com/stanislav-tkach/os_info/issues/358))

-   Ultramarine Linux support has been added. ([#&#8203;359](https://togithub.com/stanislav-tkach/os_info/issues/359))

-   AlmaLinux and Rocky Linux support has been added. ([#&#8203;360](https://togithub.com/stanislav-tkach/os_info/issues/360))

-   Ultramarine Linux support has been added. ([#&#8203;363](https://togithub.com/stanislav-tkach/os_info/issues/363))

-   Void Linux support has been added. ([#&#8203;365](https://togithub.com/stanislav-tkach/os_info/issues/365))

</details>

<details>
<summary>raphlinus/pulldown-cmark (pulldown-cmark)</summary>

### [`v0.10.2`](https://togithub.com/pulldown-cmark/pulldown-cmark/releases/tag/v0.10.2)

New release with some fixes and improvements. Note the 0.10.1 is missing (yanked from crates.io) due to a conflict with the clap version and the Rust minimum version (1.74 now instead of 1.70).

Thanks to all people that contributed to this release!

#### What's Changed

-   Limit link def expansion by [`@&#8203;notriddle](https://togithub.com/notriddle)` in [pulldown-cmark/pulldown-cmark#845
-   Do not look for HTML tags that start with backslash by [`@&#8203;notriddle](https://togithub.com/notriddle)` in [pulldown-cmark/pulldown-cmark#849
-   Count a blank line at end of indented code block towards list by [`@&#8203;notriddle](https://togithub.com/notriddle)` in [pulldown-cmark/pulldown-cmark#851
-   Use same limit for refdef as inline links by [`@&#8203;notriddle](https://togithub.com/notriddle)` in [pulldown-cmark/pulldown-cmark#854
-   Don't exit `scan_attribute` with the ix pointing at block quote by [`@&#8203;notriddle](https://togithub.com/notriddle)` in [pulldown-cmark/pulldown-cmark#858
-   Check indentation on the closing fence relative to the line by [`@&#8203;notriddle](https://togithub.com/notriddle)` in [pulldown-cmark/pulldown-cmark#862
-   Adjust strikethrough flanking rule to better fit Rustdoc Crater run by [`@&#8203;notriddle](https://togithub.com/notriddle)` in [pulldown-cmark/pulldown-cmark#864
-   perf: cargo-wizard default recommendations for runtime perf by [`@&#8203;Martin1887](https://togithub.com/Martin1887)` in [pulldown-cmark/pulldown-cmark#868

#### New Contributors

-   [`@&#8203;ehuss](https://togithub.com/ehuss)` made their first contribution in [pulldown-cmark/pulldown-cmark#848
-   [`@&#8203;jimblandy](https://togithub.com/jimblandy)` made their first contribution in [pulldown-cmark/pulldown-cmark#865
-   [`@&#8203;max-heller](https://togithub.com/max-heller)` made their first contribution in [pulldown-cmark/pulldown-cmark#866
-   [`@&#8203;blinxen](https://togithub.com/blinxen)` made their first contribution in [pulldown-cmark/pulldown-cmark#875

**Full Changelog**: pulldown-cmark/pulldown-cmark@v0.10.0...v0.10.2

</details>

<details>
<summary>rust-lang/regex (regex)</summary>

### [`v1.10.4`](https://togithub.com/rust-lang/regex/compare/1.10.3...1.10.4)

[Compare Source](https://togithub.com/rust-lang/regex/compare/1.10.3...1.10.4)

</details>

<details>
<summary>kornelski/rust-security-framework (security-framework)</summary>

### [`v2.10.0`](https://togithub.com/kornelski/rust-security-framework/compare/v2.9.2...v2.10.0)

[Compare Source](https://togithub.com/kornelski/rust-security-framework/compare/v2.9.2...v2.10.0)

</details>

<details>
<summary>serde-rs/json (serde_json)</summary>

### [`v1.0.115`](https://togithub.com/serde-rs/json/releases/tag/v1.0.115)

[Compare Source](https://togithub.com/serde-rs/json/compare/v1.0.114...v1.0.115)

-   Documentation improvements

</details>

<details>
<summary>mitsuhiko/similar (similar)</summary>

### [`v2.5.0`](https://togithub.com/mitsuhiko/similar/blob/HEAD/CHANGELOG.md#250)

[Compare Source](https://togithub.com/mitsuhiko/similar/compare/2.4.0...2.5.0)

-   Added support for `TextDiff::iter_inline_changes_deadline`.  [#&#8203;61](https://togithub.com/mitsuhiko/similar/issues/61)
-   Raise MSRV to 1.60.  [#&#8203;62](https://togithub.com/mitsuhiko/similar/issues/62)
-   Bump bstr dependency to 1.0.  [#&#8203;62](https://togithub.com/mitsuhiko/similar/issues/62)

</details>

<details>
<summary>assert-rs/trycmd (snapbox)</summary>

### [`v0.5.9`](https://togithub.com/assert-rs/trycmd/compare/snapbox-v0.5.8...snapbox-v0.5.9)

[Compare Source](https://togithub.com/assert-rs/trycmd/compare/snapbox-v0.5.8...snapbox-v0.5.9)

### [`v0.5.8`](https://togithub.com/assert-rs/trycmd/compare/snapbox-v0.5.7...snapbox-v0.5.8)

[Compare Source](https://togithub.com/assert-rs/trycmd/compare/snapbox-v0.5.7...snapbox-v0.5.8)

</details>

<details>
<summary>dtolnay/thiserror (thiserror)</summary>

### [`v1.0.58`](https://togithub.com/dtolnay/thiserror/releases/tag/1.0.58)

[Compare Source](https://togithub.com/dtolnay/thiserror/compare/1.0.57...1.0.58)

-   Make backtrace support available when using -Dwarnings ([#&#8203;292](https://togithub.com/dtolnay/thiserror/issues/292))

</details>

<details>
<summary>toml-rs/toml (toml)</summary>

### [`v0.8.12`](https://togithub.com/toml-rs/toml/compare/toml-v0.8.11...toml-v0.8.12)

[Compare Source](https://togithub.com/toml-rs/toml/compare/toml-v0.8.11...toml-v0.8.12)

### [`v0.8.11`](https://togithub.com/toml-rs/toml/compare/toml-v0.8.10...toml-v0.8.11)

[Compare Source](https://togithub.com/toml-rs/toml/compare/toml-v0.8.10...toml-v0.8.11)

</details>

<details>
<summary>thoren-d/tracing-chrome (tracing-chrome)</summary>

### [`v0.7.2`](https://togithub.com/thoren-d/tracing-chrome/releases/tag/v0.7.2)

[Compare Source](https://togithub.com/thoren-d/tracing-chrome/compare/v0.7.1...v0.7.2)

-   Support platforms that lack `AtomicU64` support.

</details>

<details>
<summary>BurntSushi/walkdir (walkdir)</summary>

### [`v2.5.0`](https://togithub.com/BurntSushi/walkdir/compare/2.4.0...2.5.0)

[Compare Source](https://togithub.com/BurntSushi/walkdir/compare/2.4.0...2.5.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 5am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/rust-lang/cargo).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->
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.

[fuzz result] URL with deeply nested parens in link def
2 participants