diff options
Diffstat (limited to '')
-rw-r--r-- | src/constant.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/constant.rs b/src/constant.rs index 5cb7826..fc74316 100644 --- a/src/constant.rs +++ b/src/constant.rs @@ -193,10 +193,15 @@ pub const HTML_RAW_SIZE_MAX: usize = 8; /// To safeguard performance, labels are capped at a large number: `999`. pub const LINK_REFERENCE_SIZE_MAX: usize = 999; -/// To do. +/// Maximum allowed unbalanced parens in destination. +/// +/// There can be many balanced parens, but if there are 33 opens that were not +/// yet closed, the destination does not parse. +/// `CommonMark` requires that at least 3 opening parens are allowed. /// See: <https://spec.commonmark.org/0.30/#link-destination>, -/// <https://github.com/remarkjs/react-markdown/issues/658#issuecomment-984345577>. -pub const LINK_RESOURCE_DESTINATION_BALANCE_MAX: usize = 32; +/// In practice, this is quite low, and several places instead cap it at 32. +/// See: <https://github.com/remarkjs/react-markdown/issues/658#issuecomment-984345577>. +pub const RESOURCE_DESTINATION_BALANCE_MAX: usize = 32; /// List of protocols allowed, when operating safely, as `href` on `a`. /// |