/************************************

  "waka" is a Japanese poetry 
         composed of 31 syllables. 

  (c) 2005 Pixel-Apes.

  -----------------------------------

  Ignore markup:

  ""ignore block""
  ~ignoreNextWord
  <waka31ignore>...</waka31ignore>

*************************************/

function wakaIgnore() {}
         wakaIgnore.prototype = new wakaToken();
         wakaIgnore.prototype.constructor = 
         wakaIgnore;

// static
wakaIgnore.prototype.getRegexpPart = function()
{
  return "(\"\"((.|\n)*?)\"\")"+
         "|"+
         "([^\\s~]*~[^\\s~]*)";
         ;
}
wakaIgnore.prototype.isRE = new RegExp( "^("+wakaIgnore.prototype.getRegexpPart() + ")$" );
wakaIgnore.prototype.is = function( outerText )
{
  var matches = this.isRE.exec( outerText );
  if (matches === null) return false;

  var _inner = "";
  if (matches[2]) _inner = matches[3];
  else            _inner = matches[5].replace("~","");

  return {
            inner : _inner,
            text  : outerText
         };
}

// private (compilation)
wakaIgnore.prototype._compile   = function()
{
  this._html = "<"+wakaFormatter.prototype.ignoreTagName+">"+
               this._data.inner+
               "</"+wakaFormatter.prototype.ignoreTagName+">";
}



