[Wikitext-l] Is wikitext an HTML shorthand language, or a real markup language?

Steve Bennett stevagewp at gmail.com
Thu Dec 20 00:56:46 UTC 2007


On 12/12/07, Jim Wilson <wilson.jim.r at gmail.com> wrote:
> Is the new grammar going to allow hard coded HTML such as <div
> class="someClass">whatever</div>?

The "new grammar" is, in theory, merely a codification of the "old
grammar". So, yes. Any deviations from what is currently allowed are
kept to a minimum, and usually only occur in unused syntax.

> If so, then wikitext is bound to remain semantically just HTML
> shorthand, right?  Since the only valid output mechanism is HTML.

Hmmm. That's true, but it would be easy to excise the raw HTML aspect
if we wanted to get away from it being bound to HTML. Also, since the
"hard coded HTML" acceptable is well defined, it would theoretically
be possible for a parser to actually interpret that HTML and do
something else with it. Like converting <b>bold</b> to an actual
interpretation of bold.


> Or, is the new grammar going to take HTML tags as input and turn them
> into part of the abstract syntax tree?  I can't see how that would be

I think it's best if the AST is closely bound to the original code,
warts and all. That means we can cache the tree, for example. In my
current grammar, ''' converts to a B node in the AST, while <b> will
convert to something else, like HTML_TAG or something.

> avoided since the apostrophes in the following should be literal
> apostrophies:
>
> <span>'''Something </span>'''

"Should"? Currently it renders as bold.

Steve



More information about the Wikitext-l mailing list