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

[fix] Fix VBA code block display error #486

Merged
merged 1 commit into from
Apr 12, 2024
Merged

Conversation

ramsayleung
Copy link
Contributor

Issue

修复第五章 VBA 代码展示问题, 原来的markdown 文档使用了 <img src="/images/speech-tract-$1.svg" class="themed" />样式, 导致 Github Markdown 无法正常渲染:

<img src="/images/speech-tract-$1.svg" class="themed" />Sub SpeakText()
<img src="/images/speech-tract-$1.svg" class="themed" />    On Error Resume Next
<img src="/images/speech-tract-$1.svg" class="themed" />    Set speech = New SpVoice
<img src="/images/speech-tract-$1.svg" class="themed" />    Selection.MoveLeft Unit:=wdWord, Count:=1
<img src="/images/speech-tract-$1.svg" class="themed" />    Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
<img src="/images/speech-tract-$1.svg" class="themed" />    If Len(Selection.Text) > 1 Then
<img src="/images/speech-tract-$1.svg" class="themed" />        speech.Speak Trim(Selection.Text), SVSFlagsAsync + SVSFPurgeBeforeSpeak
<img src="/images/speech-tract-$1.svg" class="themed" />    End If
<img src="/images/speech-tract-$1.svg" class="themed" />    Selection.MoveRight Unit:=wdWord, Count:=1
<img src="/images/speech-tract-$1.svg" class="themed" />    Do
<img src="/images/speech-tract-$1.svg" class="themed" />        DoEvents
<img src="/images/speech-tract-$1.svg" class="themed" />    Loop Until speech.WaitUntilDone(10)
<img src="/images/speech-tract-$1.svg" class="themed" />    Set speech = Nothing
<img src="/images/speech-tract-$1.svg" class="themed" />End Sub

image

Solution

使用 markdown 的 code block 语法代替 <img src="/images/speech-tract-$1.svg" class="themed" /> 样式, 效果如下:

image

@an-lee an-lee merged commit fe61c3d into ZuodaoTech:main Apr 12, 2024
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

Successfully merging this pull request may close these issues.

2 participants