diff --git a/spec/compiler/crystal/tools/doc/highlighter_spec.cr b/spec/compiler/crystal/tools/doc/highlighter_spec.cr index b59a5564b237..9ec1d9f94d38 100644 --- a/spec/compiler/crystal/tools/doc/highlighter_spec.cr +++ b/spec/compiler/crystal/tools/doc/highlighter_spec.cr @@ -42,6 +42,7 @@ describe "Crystal::Doc::Highlighter#highlight" do as as? typeof for in with self super private asm nil? abstract pointerof protected uninitialized instance_sizeof + annotation verbatim ).each do |kw| it_highlights kw, %(#{kw}) end diff --git a/src/compiler/crystal/tools/doc/highlighter.cr b/src/compiler/crystal/tools/doc/highlighter.cr index a00484dd4ac7..1c541597a4a2 100644 --- a/src/compiler/crystal/tools/doc/highlighter.cr +++ b/src/compiler/crystal/tools/doc/highlighter.cr @@ -53,7 +53,8 @@ module Crystal::Doc::Highlighter :lib, :fun, :type, :struct, :union, :enum, :macro, :out, :require, :case, :when, :select, :then, :of, :abstract, :rescue, :ensure, :is_a?, :alias, :pointerof, :sizeof, :instance_sizeof, :as, :as?, :typeof, :for, :in, - :undef, :with, :self, :super, :private, :asm, :nil?, :protected, :uninitialized, "new" + :undef, :with, :self, :super, :private, :asm, :nil?, :protected, :uninitialized, "new", + :annotation, :verbatim highlight token, "k", io when :true, :false, :nil highlight token, "n", io