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

indent-and-new-item within a code block that is under a list should not add a new bullet #841

Open
shipmints opened this issue Jul 29, 2024 · 1 comment

Comments

@shipmints
Copy link

  • Markdown Mode: 2.7-alpha (melpa)
  • Emacs: 29.3

I expected that within a properly formed code block that is under a list item, that pressing RET with markdown-indent-on-enter set to 'indent-and-new-item would not add a new list item within the code block.

Is there a way to control this behavior? I perused the code, but it didn't obviously jump out at me.

@shipmints
Copy link
Author

For the time being, I'm using this hack:

  (defun my/markdown-enter-key-advice (orig-fun &rest args)
    (let* ((bounds (markdown-get-enclosing-fenced-block-construct))
           (markdown-indent-on-enter (if bounds t markdown-indent-on-enter)))
      (apply orig-fun args)))
  (advice-add 'markdown-enter-key :around #'my/markdown-enter-key-advice)

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

No branches or pull requests

1 participant