Esempio n. 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);
 }
Esempio n. 3
0
		void CreateReader(string html)
		{
			reader = new HtmlReader(html);
		}