我正在使用https://github.com/mmistakes/so-simple-theme这真的很好。看起来昨晚 github 正确地突出显示了我的围栏代码块。在本地,在发展中,一切似乎都很好。但是当我推送到 github 存储库时, protected 代码块不会生成正确的 html 结构以确保代码突出显示。我不知道如何在我的 SO 帖子中显示它。
给出以下存储库
https://github.com/rubyonrailstutor/rubyonrailstutor.github.io
考虑这个屏幕截图
左侧显示的页面具有正确的 html 结构,右侧的 github 页面显示与左侧相同的代码则没有。我可以看什么来进一步调试这个?谢谢。
为了更深入,我使用 kramdown 风格 ~~~
#### modify spec/spec_helper.rb
~~~ruby
config.expect_with :rspec do |c|
c.syntax = :expect
end
~~~
#### modify spec/models/restaurant_spec.rb
~~~ ruby
require 'spec_helper'
describe Restaurant do
subject(:restaurant) { FactoryGirl.build(:restaurant, name: nil)}
it {expect(restaurant.valid?).to be_false}
end
~~~
最佳答案
使用肯定有问题
~~~ ruby
#some code
~~~
我不得不使用 kramdown 而不是
{% highlight ruby %}
{% endhighlight %}
我不确定我对此有何感受。
关于jekyll - 为什么 github 页面无法正确呈现我的代码块?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22337980/