bdewey/org-ruby

kbd

bkeepers opened this issue · 4 comments

We've had reports on GitHub that you can't use <kbd> tags in org mode. Any pointers?

$ gem install org-ruby
irb -rorg-ruby
Fetching: org-ruby-0.9.1.gem (100%)
Successfully installed org-ruby-0.9.1
1 gem installed
$ irb -rorg-ruby
>> Orgmode::Parser.new('(kbd \U+FFE2C-c . C\U+FFE2)
@kbd{C-c . C}
<kbd>C-c . C</kbd>').to_html
<p>(kbd C-c . C)
  @kbd{C-c . C}
  &lt;kbd&gt;C-c . C&lt;/kbd&gt;</p>

Is the issue that the <kbd> tags are becoming escaped?
If that is the case, when in Org mode it is necessary to prefix the tags like @<kbd> to avoid the tag being escaped.

I made an example here: https://gist.github.com/wallyqs/9489153
Docs from the Emacs version of the parser: https://www.gnu.org/software/emacs/manual/html_node/org/Quoting-HTML-tags.html

Thanks for the clarification - BTW it looks like the syntax has changed, the current orgmode doco describes a different syntax with a @@html: prefix

Yes, it look like the syntax changed there in later versions so the parser needs to catchup there as well.. Thanks.

fyi @vonavi just contributed a patch to reflect changes in the syntax for this: wallyqs#9

Thanks for the report, cheers.