incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Bloodhound" <bloodhound-...@incubator.apache.org>
Subject Re: [Apache Bloodhound] #420: Improved styling for `inline code`
Date Fri, 01 Mar 2013 00:02:24 GMT
#420: Improved styling for `inline code`
--------------------------+--------------------
  Reporter:  rjollos      |      Owner:  nobody
      Type:  enhancement  |     Status:  new
  Priority:  minor        |  Milestone:
 Component:  ui design    |    Version:
Resolution:               |   Keywords:
--------------------------+--------------------

Comment (by rjollos):

 Replying to [comment:1 olemis]:
 > We shall use [http://twitter.github.com/bootstrap/base-css.html#code
 Bootstrap inline code] styling. it's been used before in TracIni to render
 the list of config options .

 I tested the following patch, which requires changing
 [/browser/tags/trac-1.0.1/trac/wiki/formatter.py?marks=535,538#L533 two
 lines] in the Trac source code:

 {{{
 #!patch
 Index: trac/trac/wiki/formatter.py
 ===================================================================
 --- trac/trac/wiki/formatter.py (revision 1451214)
 +++ trac/trac/wiki/formatter.py (working copy)
 @@ -532,10 +532,10 @@
          return self._indirect_tag_handler(match, 'MM_SUPERSCRIPT')

      def _inlinecode_formatter(self, match, fullmatch):
 -        return tag.tt(fullmatch.group('inline'))
 +        return tag.code(fullmatch.group('inline'))

      def _inlinecode2_formatter(self, match, fullmatch):
 -        return tag.tt(fullmatch.group('inline2'))
 +        return tag.code(fullmatch.group('inline2'))

      # pre-0.12 public API (no longer used by Trac itself but kept for
 plugins)
 }}}

 Overall I think it produces a nice result.

 Is modification of the Trac source code the only way to accomplish this?
 The `tt` tag is [http://www.w3schools.com/tags/tag_tt.asp not supported in
 HTML5]. Do you have any thoughts on whether a patch would be well received
 in Trac at this point in time? Specifically, can you think of any reason
 why Trac would not want to move to the HTML5-valid `code` tags?

 [attachment:replace_tt_tags_with_code_tags.patch] seems to accomplish the
 change in Trac (does not include changes to unit tests, which would be
 required for a proper patch).

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/420#comment:2>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker

Mime
View raw message