level - level) + listitem(R.headId, text);
                        R.lastlevel = level;
                    } else if (R.lastlevel === level) {
                        R.archor += listitem(R.headId, text);
                    } else {
                        R.archor += listhead(level - R.lastlevel) + listitem(R.headId, text);
                        R.lastlevel = level;
                    }
                }     
                return  '<h' + level + headClass + '>' +
                            '<a id="