Beispiel #1
0
		public IEnumerable<NewFolding> GetFolds(string html)
		{
			ClearPreviousFolds();
			htmlReader = CreateHtmlReader(html);
			while (htmlReader.Read()) {
				if (htmlReader.IsEmptyElement) {
					// No folds for empty elements.
				} else if (htmlReader.IsEndElement) {
					AddFoldForCompletedElement();
				} else {
					SaveFoldStartOnStack();
				}
			}
			SortFoldsByStartOffset();
			return folds;
		}
 public IEnumerable <NewFolding> GetFolds(string html)
 {
     ClearPreviousFolds();
     htmlReader = CreateHtmlReader(html);
     while (htmlReader.Read())
     {
         if (htmlReader.IsEmptyElement)
         {
             // No folds for empty elements.
         }
         else if (htmlReader.IsEndElement)
         {
             AddFoldForCompletedElement();
         }
         else
         {
             SaveFoldStartOnStack();
         }
     }
     SortFoldsByStartOffset();
     return(folds);
 }
		void CreateReader(string html)
		{
			reader = new HtmlReader(html);
		}