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

Fill-paragraph treats lines starting with italics as bullets #79

Closed
schuster opened this issue Jan 17, 2016 · 2 comments
Closed

Fill-paragraph treats lines starting with italics as bullets #79

schuster opened this issue Jan 17, 2016 · 2 comments
Labels

Comments

@schuster
Copy link

Just ran into this today, and it's admittedly a bit of an edge case. If a bullet list item stretches over multiple lines (through the use of fill-paragraph), and one of those lines starts with a word marked with asterisks for italics, later uses of fill-paragraph will treat those asterisks as bullets rather than italic markers.

To reproduce: copy the following into a markdown-mode buffer in emacs and do a fill-paragraph (Meta-q) on it twice. The second time it will add bullet markers to 3rd and 4th lines.

* foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo *bar* baz foo bar baz foo bar baz baz foo bar baz foo bar baz baz foo bar baz foo bar baz baz foo bar baz foo bar baz baz foo bar baz foo bar baz baz foo bar baz foo bar baz

I don't know if this is fixable, but I'm reporting it in case anyone can think of a good solution.

@syohex
Copy link
Collaborator

syohex commented Jan 18, 2016

Could you try again after setting adaptive-fill-regexp as below ?

(defun my-markdown-mode-hook ()
  (set (make-local-variable 'adaptive-fill-regexp) "\\s-*"))
(add-hook 'markdown-mode-hook #'my-markdown-mode-hook)

Or evaluate s-exp in markdown buffer as below steps.

  • Open markdown file
  • M-: (set (make-local-variable 'adaptive-fill-regexp) "\\s-*")

@jrblevin
Copy link
Owner

Thanks, @syohex! Your patch fixed the problem for me. Thanks for the report, @schuster. I am closing this, but feel free to re-open if this didn't solve the issue for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants