Closed tomzx closed 3 years ago
Thank you, @tomzx. I will look into this issue as soon as I can.
Other interesting things about Markdown files: **Bold text**
at the beginning of a line is interpreted as a comment, causing all lines afterward to gain a *
prefix.
FYI, I plan on tackling better Markdown support during October for Hacktoberfest.
I started on this but ran out of time. It's my most desired feature, so I will resume after the holidays!
I would like to see this handled better too. I use reST for my docstrings in PyCharm and have things like:
:param foo: Does foo things. See also *bar*.
:param bar: Very different than *foo*.
The problem is that when markup like *foo*
or *bar*
gets near the wrap point, Wrap (Line) To Column has a tendency to strip off one or more of those asterisks. Sadly, I often don't notice until after commit/release. If I have to do much docstring work, I just resort to VIM which largely defeats the whole purpose.
Another example are dashed lists, i.e. paragraphs that start with "- " or "# " (a dash or hash followed by one or several spaces). In reStructuredText (and I guess in markdown as well) all remaining lines should have the same indentation as the first character of the first line (counting the "-" or "#" like a space).
Ya, using this with Markdown is challenging as lists don't wrap correctly
* List item 1
* List item 2 that's very very very very long
Becomes
* List item 1
* List item 2 that's very
* very very very long
The plugin needs some work on filetype-specific logic, which would help in a few of these areas. Some day I will add this. 😂
Should be fixed in 1.7.0, now published to the Plugins Marketplace.
We now ignore most comment-like symbols in Markdown and AsciiDoc files, except for list symbols. If we find a list symbol, we'll wrap the text around it like this:
- Imagine this is a long line and
the plugin has wrapped it.
PHPStorm 10.0.2
I have the following (shorten) bit of text, which doesn't appear to wrap properly.
Given
After applying Wrap to column with a setting of 80, I get