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

Invalid matching of emphasize in html #410

Closed
jo-so opened this issue Aug 24, 2019 · 7 comments
Closed

Invalid matching of emphasize in html #410

jo-so opened this issue Aug 24, 2019 · 7 comments

Comments

@jo-so
Copy link

jo-so commented Aug 24, 2019

Expected Behavior

In HTML blocks no matching of *, _ or ` should happen.

Actual Behavior

In

<html>
<head>
  <meta name="twitter:site" content="@jo_so7">
  <meta name="twitter:creator" content="@jo_so7">
</head>
<body>

the twitter:creator and all around becomes highlighted as emphasized.

Steps to Reproduce

  1. Open a file with the above code emacs -Q --load path/to/markdown-mode.el /tmp/test.md
  2. Move point to twitter:creator
  3. Press C-u C-x =
  4. The line face (markdown-html-attr-name-face markdown-italic-face) contains italic

Software Versions

  • Markdown Mode: 2.4-dev
  • Emacs: GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.10) of 2019-07-22, modified by Debian
  • OS: Debian
@syohex
Copy link
Collaborator

syohex commented Apr 12, 2020

Thanks for reporting issue. I have merged PR #441. Please check latest version.

@syohex syohex closed this as completed Apr 12, 2020
@jo-so
Copy link
Author

jo-so commented Apr 12, 2020

Does the PR #441 also address code spans like this?

<meta abc="`..." def="`..." />

@syohex
Copy link
Collaborator

syohex commented Apr 12, 2020

Does the PR #441 also address code spans like this?

No

However is there any use case with such attribute value(starts with backtick)?

@jo-so
Copy link
Author

jo-so commented Apr 13, 2020

Maybe this:

<pre><code>
% echo `date -s`
</code></pre>

@syohex
Copy link
Collaborator

syohex commented Apr 13, 2020

It looks backticks are not in HTML tag attribute field.

@jo-so
Copy link
Author

jo-so commented Apr 13, 2020 via email

@syohex
Copy link
Collaborator

syohex commented Apr 14, 2020

I see however I suppose fixing that issue is very difficult with current implementation. I suppose you can use decimal/hexadecimal reference like &#96; for avoiding this issue or use html-mode instead of markdown-mode for writing such HTML or write patch.

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

2 participants