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

リンクテキスト内でルビ記法が処理されない #185

Open
MurakamiShinyu opened this issue Dec 14, 2023 · 0 comments
Open

リンクテキスト内でルビ記法が処理されない #185

MurakamiShinyu opened this issue Dec 14, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@MurakamiShinyu
Copy link
Member

MurakamiShinyu commented Dec 14, 2023

Issue Details

リンクテキスト内でルビ記法を使うと、ルビとして処理されません。

  • VFM version
    • 2.2.1

Expected Behavior

[{愛|あい}](ai.html)

<p><a href="ai.html"><ruby><rt>あい</rt></ruby></a></p>

と変換されるべき。

Actual Behavior

<p><a href="ai.html">{愛|あい}</a></p>

となる。

また、MDのリンク記法を使わないで

<a href="ai.html">{愛|あい}</a>

を入力とした場合も同じ結果。

Debug log (Any)

Run vfm with DEBUG=vfm to see detailed log.

$ DEBUG=vfm vfm <<< '[{愛|あい}](ai.html)'
  vfm 
  vfm ### mdast ### +0ms
  vfm root[1] (1:1-2:1, 0-18)
  vfm └─0 paragraph[1] (1:1-1:18, 0-17)
  vfm     └─0 link[1] (1:1-1:18, 0-17)
  vfm         │ title: null
  vfm         │ url: "ai.html"
  vfm         └─0 text "{愛|あい}" (1:2-1:8, 1-7) +1ms
  vfm 
  vfm ### hast ### +2ms
  vfm root[1] (1:1-2:1, 0-18)
  vfm │ data: {"quirksMode":false}
  vfm └─0 element<p>[1] (1:1-1:18, 0-17)
  vfm     │ properties: {}
  vfm     └─0 element<a>[1] (1:1-1:18, 0-17)
  vfm         │ properties: {"href":"ai.html"}
  vfm         └─0 text "{愛|あい}" (1:2-1:8, 1-7) +0ms
  vfm {} +2ms
<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
  </head>
  <body>
    <p><a href="ai.html">{愛|あい}</a></p>
  </body>
@MurakamiShinyu MurakamiShinyu added the bug Something isn't working label Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants