35 public $insClass =
' class="diffchange diffchange-inline"';
36 public $delClass =
' class="diffchange diffchange-inline"';
47 if ( $this->
group !==
'' ) {
48 if ( $this->tag ==
'ins' ) {
49 $this->
line .=
"<ins{$this->insClass}>" . htmlspecialchars( $this->
group ) .
'</ins>';
50 } elseif ( $this->tag ==
'del' ) {
51 $this->
line .=
"<del{$this->delClass}>" . htmlspecialchars( $this->
group ) .
'</del>';
53 $this->
line .= htmlspecialchars( $this->
group );
57 $this->tag = $new_tag;
65 if ( $this->
line !=
'' ) {
66 array_push( $this->lines, $this->
line );
68 # make empty lines visible by inserting an NBSP
69 array_push( $this->lines,
' ' );
78 public function addWords( $words, $tag =
'' ) {
79 if ( $tag != $this->tag ) {
83 foreach ( $words as $word ) {
88 if ( $word[0] ==
"\n" ) {
90 $word = substr( $word, 1 );
92 assert( !strstr( $word,
"\n" ) );
93 $this->
group .= $word;
no text was provided for refs named< code > blankwithnoreference</code ></span ></li ></ol ></div > !end !test with< references/> in group !wikitext Wikipedia rocks< ref > Proceeds of vol XXI</ref > Wikipedia rocks< ref group=note > Proceeds of vol XXI</ref >< references/>< references group=note/> ! html< p > Wikipedia rocks< sup id="cite_ref-1" class="reference">< a href="#cite_note-1"> &Wikipedia rocks< sup id="cite_ref-2" class="reference">< a href="#cite_note-2"> &</p >< div class="mw-references-wrap">< ol class="references">< li id="cite_note-1">< span class="mw-cite-backlink">< a href="#cite_ref-1"> ↑</a ></span >< span class="reference-text"> Proceeds of vol XXI</span ></li ></ol ></div >< div class="mw-references-wrap">< ol class="references">< li id="cite_note-2">< span class="mw-cite-backlink">< a href="#cite_ref-2"> ↑</a ></span >< span class="reference-text"> Proceeds of vol XXI</span ></li ></ol ></div > !end !test with< references/> in group
I won t presume to tell you how to I m just describing the methods I chose to use for myself If you do choose to follow these it will probably be easier for you to collaborate with others on the but if you want to contribute without by all means do which work well I also use K &R brace matching style I know that s a religious issue for so if you want to use a style that puts opening braces on the next line