Comments (3)
これ、BitClustのシンタックスハイライト機能が終端なしのRangeに対応していなくてエラーになるからなんですよ。
BitClustが終端なしのRangeに対応していないわけではありません。BitClustはシンタックスハイライトにRipperを使っており、RipperはランタイムのRubyのバージョンに依存してパースできる文が決まります。
なのでるりまサーチを動かしているサーバーのRubyのバージョンを上げると解決すると思われます。
from bitclust.
syntax errorがあってもそれっぽくハイライトできるようにする、というのはありかもしれません。新しい構文のドキュメントを書こうとする度に起こる問題ですし。
その場合syntax errorに気がつけなくなると悲しいので、何らかの仕組みで気が付けるようにはしておきたいですね。
from bitclust.
なるほど。
るりまサーチで使っているRubyはできればAPTでインストールできるバージョンを使いたいので、このケースのためにRubyのバージョンは上げたくありません。
#109 のようにオプションを指定したときだけシンタックスハイライトに失敗したらソースそのものを表示するのはどうですか?オプションを指定しないときは既存の動作と変わりません。
from bitclust.
Related Issues (20)
- トップページの「Builtin libraries」などの日本語化
- 記号メソッド呼び出しの構文ハイライトがおかしい HOT 1
- メソッドの一覧が読み取りづらい HOT 7
- 意図と違う(?)文字クラス [ \t\z] HOT 1
- メソッド検索のページを作る
- SEOとして `sitemap.xml` を作成する
- メタタグのdescriptionでも、改行による不要な空白を取り除きたい
- あるメソッド(or クラス/モジュール/ライブラリ)がどのバージョンから使えるかを表示する HOT 1
- undef 対応で個別メソッドのページが残っている HOT 1
- %i[]のシンタックスハイライトがうまくいってなさそう
- samplecode の代わりに syntax highlight なしの sampleなんとか がほしい HOT 1
- Protectedインスタンスメソッドが、Publicインスタンスメソッドに混ざっている HOT 1
- 説明のための未定義のメソッド欄の区分を設けたい
- 同名により再定義されたメソッドが区別できるようにわけてほしい
- サンプルコードの特異メソッド内でObject.newが.newObjectになる HOT 1
- Wikiの情報が古いのかすぐ使えないものが多い(特にhtmlfileサブコマンド) HOT 3
- サンプルコード内の `class Foo; end` が `class ;Foo end` と表示される
- IE11でJavaScriptエラーをcatchして無視する HOT 3
- refe2のgemspecにmetadataを記載する HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bitclust.