spotikhanov
a653e8adda
Remove ENABLE_MATH option from pulldown_cmark to fix links which contain dollar sign ( #22647 )
...
This pr closes #21466 issue by disabling math in pulldown_cmark Parser.
The dollar sign symbol is used in pulldown_cmark Math extension, see
"Math in links" section for more details:
https://pulldown-cmark.github.io/pulldown-cmark/specs/math.html
I've tried another approach at first, without disabling math extension:
```
let iterator = TextMergeWithOffset::new(Parser::new_ext(text, options));
```
instead of current implementation
```
Parser::new_ext(text, options).into_offset_iter()
```
This way pulldown_cmark merges consecutive text events and this helps to
correctly parse links from plain text:
https://svelte.dev/docs/svelte/$state
But in this case the dollar sign still breaks markdown links:
\[https://svelte.dev/docs/svelte/$state ](https://svelte.dev/docs/svelte/$state )
So in the end I disabled the math extension, it fixes both link formats.
See markdown/examples/markdown.rs to reproduce.
Release Notes:
- N/A
2025-01-07 21:21:18 +00:00
Conrad Irwin
4084ba36f9
Fix clang popovers ( #20090 )
...
Closes #15498
Release Notes:
- Fixed info popups from clangd missing information
2024-11-01 13:28:34 -06:00
Marshall Bowers
a078cb104c
Disable definition lists in Markdown ( #17648 )
...
This PR disables definition list support in `pulldown_cmark`, as it is
has been causing a number of issues.
I opened an issue upstream with the panic we were seeing:
https://github.com/pulldown-cmark/pulldown-cmark/issues/957 .
Release Notes:
- N/A
2024-09-10 11:16:27 -04:00
Marshall Bowers
da9601c698
markdown: Handle definition lists in parser ( #17617 )
...
Resolves https://github.com/zed-industries/zed/issues/17607 .
This PR makes it so the Markdown parser can handle Markdown containing
definition lists.
Note that this is just parser support, we aren't yet doing anything with
the definition lists themselves.
Release Notes:
- N/A
2024-09-09 17:49:40 -04:00
Piotr Osiewicz
e6c1c51b37
chore: Fix several style lints ( #17488 )
...
It's not comprehensive enough to start linting on `style` group, but
hey, it's a start.
Release Notes:
- N/A
2024-09-06 11:58:39 +02:00
Marshall Bowers
b54d1aa95e
Upgrade pulldown_cmark
to v0.12 ( #17418 )
...
This PR upgrades `pulldown_cmark` to v0.12.
There were a few breaking changes that needed to be accounted for:
- The `BlockQuote` variant now has a `kind` attached. Right now we're
ignoring it.
- `pulldown_cmark` now emits tags for definition lists. This codepath
has been left unimplemented, for now.
### Release Notes
<details>
<summary>raphlinus/pulldown-cmark (pulldown-cmark)</summary>
###
[`v0.12.1`](https://redirect.github.com/pulldown-cmark/pulldown-cmark/releases/tag/v0.12.1 ):
0.12.1
[Compare
Source](https://redirect.github.com/raphlinus/pulldown-cmark/compare/v0.12.0...v0.12.1 )
##### Security
- Fix O(n\*\*2) comment parser by
[@​notriddle](https://redirect.github.com/notriddle ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/941 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/941 )
##### New features
- impl From<CowStr> for String by
[@​oconnor663](https://redirect.github.com/oconnor663 ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/943 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/943 )
##### Developers
- Make dos-fuzzer part of the workspace by
[@​kdarkhan](https://redirect.github.com/kdarkhan ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/945 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/945 )
##### New Contributors
- [@​oconnor663](https://redirect.github.com/oconnor663 ) made
their first contribution in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/943 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/943 )
- [@​kdarkhan](https://redirect.github.com/kdarkhan ) made their
first contribution in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/945 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/945 )
**Full Changelog**:
https://github.com/pulldown-cmark/pulldown-cmark/compare/v0.12.0...v0.12.1
###
[`v0.12.0`](https://redirect.github.com/pulldown-cmark/pulldown-cmark/releases/tag/v0.12.0 ):
0.12.0
[Compare
Source](https://redirect.github.com/raphlinus/pulldown-cmark/compare/v0.11.3...v0.12.0 )
Thanks to all contributors! This release mainly adds the long awaited
commonmark-hs description lists (under a flag) and enables the
blockquote kind in `TagEnd` reverted in 0.11.2.
#### Breaking changes
- feat: re-add kind for BlockQuote in TagEnd by
[@​Martin1887](https://redirect.github.com/Martin1887 ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/940 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/940 )
- Refactor TextMergeStream by
[@​ollpu](https://redirect.github.com/ollpu ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/931 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/931 )
#### New features
- Implement commonmark-hs compatible definition lists by
[@​notriddle](https://redirect.github.com/notriddle ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/915 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/915 )
#### Other changes
- Rename superlinear time fuzzer to `dos-fuzzer` by
[@​ollpu](https://redirect.github.com/ollpu ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/938 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/938 )
**Full Changelog**:
https://github.com/pulldown-cmark/pulldown-cmark/compare/v0.11.2...v0.12.0
###
[`v0.11.3`](https://redirect.github.com/pulldown-cmark/pulldown-cmark/releases/tag/v0.11.3 ):
0.11.3
[Compare
Source](https://redirect.github.com/raphlinus/pulldown-cmark/compare/v0.11.2...v0.11.3 )
#### Security
- Fix O(n\*\*2) comment parser by
[@​notriddle](https://redirect.github.com/notriddle ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/944 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/944 )
**Full Changelog**:
https://github.com/pulldown-cmark/pulldown-cmark/compare/v0.11.2...v0.11.3
###
[`v0.11.2`](https://redirect.github.com/pulldown-cmark/pulldown-cmark/releases/tag/v0.11.2 )
[Compare
Source](https://redirect.github.com/raphlinus/pulldown-cmark/compare/v0.11.1...v0.11.2 )
Revert BlockQuote kind to avoid breaking change.
###
[`v0.11.1`](https://redirect.github.com/pulldown-cmark/pulldown-cmark/releases/tag/v0.11.1 )
[Compare
Source](https://redirect.github.com/raphlinus/pulldown-cmark/compare/v0.11.0...v0.11.1 )
Thanks to all people involved in this release! The main change of this
release is the reduction of the MSRV to 1.71.1, but it also includes a
lot of bug fixes and a new mdBook for user-friendly documentation.
#### Breaking changes
- Add BlockQuoteKind to BlockQuote TagEnd by
[@​notriddle](https://redirect.github.com/notriddle ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/926 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/926 )
(reverted in v0.11.2)
#### What's Changed
- fix: CowStr deserialization when escaping by
[@​aatifsyed](https://redirect.github.com/aatifsyed ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/895 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/895 )
- fix(test): fix generating spec tests doesn't work on Windows due to
line-endings by [@​rhysd](https://redirect.github.com/rhysd ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/903 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/903 )
- feat: add `-G` CLI option to enable GFM support by
[@​rhysd](https://redirect.github.com/rhysd ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/905 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/905 )
- feat: set `DefaultBrokenLinkCallback` as the default broken link
callback of `OffsetIter` by
[@​rhysd](https://redirect.github.com/rhysd ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/901 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/901 )
- chore(doc): use `cargo add` to instruct how to install this crate as
dependency by [@​rhysd](https://redirect.github.com/rhysd ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/904 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/904 )
- fix typo by [@​jmbhughes](https://redirect.github.com/jmbhughes )
in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/909 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/909 )
- Fix parsing blocks inside alert body by
[@​rhysd](https://redirect.github.com/rhysd ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/908 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/908 )
- fuzz: fix building fuzzer and improve fuzzing coverage by enabling
more parse options by [@​rhysd](https://redirect.github.com/rhysd )
in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/910 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/910 )
- fix: fix warnings reported from nightly rustc by
[@​rhysd](https://redirect.github.com/rhysd ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/911 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/911 )
- fix: fix infinite loop when metadata delimiter is indented by
[@​rhysd](https://redirect.github.com/rhysd ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/913 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/913 )
- Raise the link cutoff from 5 to 32 by
[@​notriddle](https://redirect.github.com/notriddle ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/917 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/917 )
- Reduce MSRV to 1.71.1 by separating benchmarks into a new crate with
CI enhancements by [@​rhysd](https://redirect.github.com/rhysd ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/916 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/916 )
- Add guide book and deploy script for it by
[@​notriddle](https://redirect.github.com/notriddle ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/883 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/883 )
- ci: fix deploying the document to GitHub Pages and make the deploy job
faster by [@​rhysd](https://redirect.github.com/rhysd ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/920 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/920 )
- Fix lone task list item bug by
[@​notriddle](https://redirect.github.com/notriddle ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/924 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/924 )
- Fix offset range around footnotes that look like images by
[@​notriddle](https://redirect.github.com/notriddle ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/925 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/925 )
- Update old footnote format to interrupt paragraph by
[@​notriddle](https://redirect.github.com/notriddle ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/928 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/928 )
- Fix confusing bug with back-to-back footnotes by
[@​notriddle](https://redirect.github.com/notriddle ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/930 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/930 )
- Add reproduction cases for
[#​927](https://redirect.github.com/raphlinus/pulldown-cmark/issues/927 )
by [@​zoni](https://redirect.github.com/zoni ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/929 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/929 )
- Add regression test for
[#​655](https://redirect.github.com/raphlinus/pulldown-cmark/issues/655 )
by [@​ollpu](https://redirect.github.com/ollpu ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/932 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/932 )
- Renovate the superlinear time fuzzer by
[@​ollpu](https://redirect.github.com/ollpu ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/935 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/935 )
#### New Contributors
- [@​aatifsyed](https://redirect.github.com/aatifsyed ) made their
first contribution in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/895 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/895 )
- [@​jmbhughes](https://redirect.github.com/jmbhughes ) made their
first contribution in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/909 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/909 )
- [@​zoni](https://redirect.github.com/zoni ) made their first
contribution in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/929 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/929 )
**Full Changelog**:
https://github.com/pulldown-cmark/pulldown-cmark/compare/v0.11.0...v0.11.1
###
[`v0.11.0`](https://redirect.github.com/pulldown-cmark/pulldown-cmark/releases/tag/v0.11.0 ):
0.11.0
[Compare
Source](https://redirect.github.com/raphlinus/pulldown-cmark/compare/v0.10.3...v0.11.0 )
##### Finally, the so long awaited math mode is here! Enable the option
to use it.
This release also includes other improvements and bugfixes, please see
the changelog below for more details. Thanks to all contributors that
has made possible this release!
#### Breaking changes
- Change `write_to_html` to allow `fmt::Write` by
[@​stepantubanov](https://redirect.github.com/stepantubanov ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/870 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/870 )
#### New features
- Math mode
#### Bugfixes
- \[0.11] Don't exit `scan_attribute` with the ix pointing at block
quote by [@​notriddle](https://redirect.github.com/notriddle ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/873 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/873 )
- (Re)introduce simd feature to pulldown-cmark-escape by
[@​ollpu](https://redirect.github.com/ollpu ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/880 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/880 )
- fix: remove unnecessary end_newline set by
[@​tomcur](https://redirect.github.com/tomcur ) in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/885 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/885 )
#### New Contributors
- [@​duskmoon314](https://redirect.github.com/duskmoon314 ) made
their first contribution in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/874 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/874 )
- [@​stepantubanov](https://redirect.github.com/stepantubanov )
made their first contribution in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/870 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/870 )
- [@​tomcur](https://redirect.github.com/tomcur ) made their first
contribution in
[https://github.com/pulldown-cmark/pulldown-cmark/pull/885 ](https://redirect.github.com/pulldown-cmark/pulldown-cmark/pull/885 )
**Full Changelog**:
https://github.com/pulldown-cmark/pulldown-cmark/compare/v0.10.3...v0.11.0
</details>
Release Notes:
- N/A
2024-09-05 10:46:51 -04:00
Conrad Irwin
09c698d8d7
Fix a panic when diagnostics contain multiple links ( #16601 )
...
Follow up from #14518
Release Notes:
- Fixed a panic when diagnostics contain multiple links
2024-08-21 11:18:43 -06:00
Ephram
78a2539d59
Selectable diagnostic popover text ( #14518 )
...
Release Notes:
- Added the ability to select and copy text from diagnostic popovers
- Fixed #12695
https://github.com/user-attachments/assets/b896bacf-ecbc-48f5-8228-a3821f0b1a4e
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-07-28 23:13:13 -06:00
Ephram
945764e409
Selectable popover text ( #12918 )
...
Release Notes:
- Fixed #5236
- Added the ability to select and copy text from information popovers
https://github.com/zed-industries/zed/assets/50590465/d5c86623-342b-474b-913e-d07cc3f76de4
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Antonio <ascii@zed.dev>
2024-07-10 21:14:34 -06:00
Jakob Hellermann
a1e5b122e7
Fix some warnings/issues uncovered by the new cfg checking ( #12310 )
...
Rust recently got the ability to check for typos or errors in `cfg`
attributes: https://blog.rust-lang.org/2024/05/06/check-cfg.html
This PR fixes the new warnings.
- gpui can be run with `RUSTFLAGS="--cfg gles"`, make this explicit in
`[workspace.lints.rust]`
- `cfg!(any(test, sqlite))` was just a bug, it should be
`feature(sqlite)`
- the `languages` crate had a `#[cfg(any(test, feature =
"test-support"))]` function without ever declaring the `test-support`
feature
- the `MarkdownTag` enum had a `cfg_attr` for serde without actually
having serde support
Now the only warnings when building are unused fields
`InlayHover.excerpt`, `SavedConversationMetadata.path` ,
`UserTestPlan.allow_client_reconnection` and `SyntaxMapCapture.depth`.
Release Notes:
- N/A
2024-05-26 12:50:20 +02:00
Antonio Scandurra
5df1481297
Introduce a new markdown
crate ( #11556 )
...
This pull request introduces a new `markdown` crate which is capable of
parsing and rendering a Markdown source. One of the key additions is
that it enables text selection within a `Markdown` view. Eventually,
this will replace `RichText` but for now the goal is to use it in the
assistant revamped assistant in the spirit of making progress.
<img width="711" alt="image"
src="https://github.com/zed-industries/zed/assets/482957/b56c777b-e57c-42f9-95c1-3ada22f63a69 ">
Note that this pull request doesn't yet use the new markdown renderer in
`assistant2`. This is because we need to modify the assistant before
slotting in the new renderer and I wanted to merge this independently of
those changes.
Release Notes:
- N/A
---------
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Alp <akeles@umd.edu>
Co-authored-by: Zachiah Sawyer <zachiah@proton.me>
2024-05-09 11:03:33 +02:00