Edgewall Software

Changes between Initial Version and Version 1 of TracDev/Proposals/AdvancedWikiFormatting


Ignore:
Timestamp:
Jun 8, 2009, 4:19:32 PM (15 years ago)
Author:
Christian Boos
Comment:

some of my ideas for WikiFormatting extensions and improvements

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/Proposals/AdvancedWikiFormatting

    v1 v1  
     1[[PageOutline(2-3)]]
     2= Trac Wiki Syntax enhancements =
     3
     4== Simple Tables ==
     5
     6Simple tables in Trac are really too primitive.
     7Some simple enhancements that would greatly enhance their expressiveness could be made.
     8
     9=== support for <th> ===
     10This is #3347.
     11
     12The syntax would be:
     13{{{
     14||= header =||= another header =|| not a header ||
     15||= line xx=|| data1 || data2 ||
     16}}}
     17
     18=== support for column span ===
     19I have a patch, but #T1293 suggests that the preferred syntax would be to have an ''even'' number of pipes, e.g. `||||` and `||||||` to indicate a span of 2 and 3, instead of `|||` and `||||`.
     20
     21=== long columns ===
     22Then, simple tables are not that readable when there are multiple cells with long content.
     23It would be better to be able to have one cell per line, without triggering the creation of a new row. The \ continuation character come to mind:
     24{{{
     25|| this is column 1 [http://trac.edgewall.org/newticket new ticket] || \
     26|| this is column 2 [http://trac.edgewall.org/roadmap the road ahead] || \
     27|| that's column 3 and last one ||
     28}}}
     29
     30=== even longer columns ===
     31
     32Now for complex content, it would be extra-cool to be able to embed ''any'' wiki content in a cell.
     33That can be achieved at little cost, as usual by using processing instructions.
     34We'd need to add `!#th` and `#!td`, and find a way to trigger the creation of new rows.
     35Besides rich content, this also offers an alternative syntax for [#supportforth] and for [#supportforcolumnspan], as well as giving the possibility to specify the `rowspan`.
     36
     37== Enhanced lists ==
     38
     39There are two enhancements that come to mind:
     40 - no leading spaces
     41 - 1) style numbered items
     42 - o style numbered items
     43
     44i.e.
     45{{{
     46- this is a list
     47- next item
     48
     49 o  this is a list
     50 o  that's another list
     51
     521) Point 1
     53
     542) Point 2
     55}}}
     56
     57Also, points 1) and 2) should be part of the ''same'' list (=> slight difficulty for the VerticalHorizontalParsing, need to consider empty lines as potential "no-ops" in some situations).
     58
     59== Enhanced headings ==
     60
     61The automatic ids generated for headings are not readable.
     62We should replace spaces by hyphens, at the very least.
     63Compatibility with the old compact style could be achieved by using the `name` attribute, whereas `id` would be used for the new, more readable style.
     64
     65In the line of Trac:WikiCreole support, we should not require closing `=*...`. Starting with an `=` sign should be enough.
     66
     67
     68== Enhanced processors ==
     69
     70We could do with a more compact syntax for WikiProcessors.
     71The #! stuff doesn't need to be on a standalone line, it should be possible to stuff it on the same line as the `{{{` prefix.
     72e.g.
     73`{{{#!div ...`
     74maybe even `{{{ div ...` if possible (probably not).
     75
     76Also, not only the `div` but any other processor should be able to get extra properties (key=value pairs, like for divs).
     77
     78That will be needed by the !#th and !#td processors, in order to handle rowspan, colspan, and maybe alignment attributes.
     79
     80== Camel Case ==
     81
     82The MoinMoin style internal free link has been introduced to cope with wiki words with appended content, like when writing `["WikiProcessor"]s`. First, the implementation is restricted: it doesn't allow for a lhref equivalent, `["WikiProcessor" the wiki processors]` (#T7695). What if we would instead re-use the lhref regexp, in the quoted case? It would be equivalent to making the ''wiki:'' prefix the default namespace. The advantage would be that ''any'' word could be wikified that way.
     83 - `["checking"]` -> ["checking"]: works already
     84 - `["checking" the check]` -> ["checking" the check]: doesn't work
     85
     86For pure CamelCase words, the MoinMoin style of using empty code spans {{{``}}} as a separator also works in Trac: CamelCase``s.
     87
     88== Alternative forms of linking == #linking
     89
     90 - #T7386 <http://something>
     91 - Creole-style (MoinMoin supports it now)  `[[<link>|blah blah]]`
     92 - `[=#anchor <label>]` creation, see #6413
     93