src/Pure/Isar/document_structure.scala
changeset 64610 1b89608974e9
parent 63666 ff6caffcaed4
child 68840 51ab4c78235b
equal deleted inserted replaced
64609:7cc4b49be1ea 64610:1b89608974e9
   188       val (toks, next_context) = ML_Lex.tokenize_line(SML, line, context)
   188       val (toks, next_context) = ML_Lex.tokenize_line(SML, line, context)
   189       val level =
   189       val level =
   190         toks.filterNot(_.is_space) match {
   190         toks.filterNot(_.is_space) match {
   191           case List(tok) if tok.is_comment =>
   191           case List(tok) if tok.is_comment =>
   192             val s = tok.source
   192             val s = tok.source
   193             if (Word.codepoint_iterator(s).exists(c =>
   193             if (Codepoint.iterator(s).exists(c => Character.isLetter(c) || Character.isDigit(c)))
   194                   Character.isLetter(c) || Character.isDigit(c)))
       
   195             {
   194             {
   196               if (s.startsWith("(**** ") && s.endsWith(" ****)")) Some(0)
   195               if (s.startsWith("(**** ") && s.endsWith(" ****)")) Some(0)
   197               else if (s.startsWith("(*** ") && s.endsWith(" ***)")) Some(1)
   196               else if (s.startsWith("(*** ") && s.endsWith(" ***)")) Some(1)
   198               else if (s.startsWith("(** ") && s.endsWith(" **)")) Some(2)
   197               else if (s.startsWith("(** ") && s.endsWith(" **)")) Some(2)
   199               else if (s.startsWith("(* ") && s.endsWith(" *)")) Some(3)
   198               else if (s.startsWith("(* ") && s.endsWith(" *)")) Some(3)