-
Notifications
You must be signed in to change notification settings - Fork 40
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
Answers not displayed because of markdown error #366
Comments
Or perhaps this is more useful. Open a buffer with the name (with-current-buffer "*test-sx-bug*"
(erase-buffer)
(sx-question-mode--insert-markdown "**\n```\nfoo\n\n```"))) |
The last invocation of
|
Inside of
Remove the So |
This seems to resolve the issue: "If there's a pre block ahead, handle it, skip it and return t.
Handling means to turn it into a button and remove erroneous
font-locking.
If DONT-FONTIFY is non-nil, just return the result and possibly
move point, don't create the code-block button."
(let ((beg (line-beginning-position)))
;; To identify code-blocks we need to be at start of line.
(goto-char beg)
(when (fboundp 'markdown-syntax-propertize)
- (markdown-syntax-propertize (point) (point-max)))
+ (ignore-errors
+ (markdown-syntax-propertize (point) (point-max))))
(when (markdown-match-pre-blocks (line-end-position))
(unless dont-fontify
(sx-babel--make-pre-button beg (point)))
t))) I think it's correct because |
Thanks for the bug report and investigation! This project is definitely in maintenance mode for me – at least for the time being. If you were to open a PR with this change (appropriately formatted with the |
I got nerd sniped into reducing this one for you 😄
I think it's a markdown issue that might need resolved upstream, of course maybe it's appropriate to just abort highlighting in
sx
when there is an error sincemarkdown-mode
may never be perfect.full backtrace
I started with:
Then after seeing arguments and what the results of this were:
(sx--link-to-data "https://superuser.com/questions/1606898/hiding-qemu-virtualization-in-guest-windows-10")
Reduced the size of the reproducer quite a lot by trial and error:
The text was updated successfully, but these errors were encountered: