code: function escapedIBSiblingNodeText(state, text, opts) {
  	// For a sequence of 2+ quote chars, we have to
  	// fully wrap the sequence in <nowiki>...</nowiki>
  	// <nowiki/> at the start and end doesn't work.
  	//
  	// Ex: ''<i>foo</i> should serialize to <nowiki>''</nowiki>''foo''.
  	//
  	// Serializing it to ''<nowiki/>''foo'' breaks html2html semantics
  	// since it will parse back to <i><meta../></i>foo<i></i>
  	if (text.match(/''+/)) {
  		// Minimize the length of the string that is wrapped in <nowiki>.
  		var pieces = text.split("'");
  		var first = pieces.shift();
  		var last = pieces.pop();
  		return first + "<nowiki>'" + pieces.join("'") + "'</nowiki>" + last;
  	}
  
  	// Check whether the head and/or tail of the text needs <nowiki/> protection.
  	var out = '';
  	if (hasTrailingEscapableQuoteChar(text, opts)) {
  		state.hasQuoteNowikis = true;
  		out = text + "<nowiki/>";
  	}
  
  	if (hasLeadingEscapableQuoteChar(text, opts)) {
  		state.hasQuoteNowikis = true;
  		out =  "<nowiki/>" + (out || text);
  	}
  
  	return out;
  }
docs: SSS FIXME: By doing a DOM walkahead to identify what else is on the current line, these heuristics can be improved. Ex: '<i>foo</i> blah blah does not require a <nowiki/> after the single quote since we know that there are no other quotes on the rest of the line that will be emitted. Similarly, '' does not need a <nowiki> wrapper since there are on other quote chars on the line.  This is checking text-node siblings of i/b tags.