equal
deleted
inserted
replaced
41 def text: String = doc.text |
41 def text: String = doc.text |
42 |
42 |
43 lazy val bytes: Bytes = Bytes(text) |
43 lazy val bytes: Bytes = Bytes(text) |
44 lazy val chunk: Symbol.Text_Chunk = Symbol.Text_Chunk(text) |
44 lazy val chunk: Symbol.Text_Chunk = Symbol.Text_Chunk(text) |
45 lazy val bibtex_entries: List[Text.Info[String]] = |
45 lazy val bibtex_entries: List[Text.Info[String]] = |
46 try { Bibtex.document_entries(text) } |
46 try { Bibtex.entries(text) } |
47 catch { case ERROR(_) => Nil } |
47 catch { case ERROR(_) => Nil } |
48 } |
48 } |
49 |
49 |
50 def init(session: Session, editor: Server.Editor, node_name: Document.Node.Name): Document_Model = |
50 def init(session: Session, editor: Server.Editor, node_name: Document.Node.Name): Document_Model = |
51 Document_Model(session, editor, node_name, Content.empty) |
51 Document_Model(session, editor, node_name, Content.empty) |
129 /* blob */ |
129 /* blob */ |
130 |
130 |
131 def get_blob: Option[Document.Blob] = |
131 def get_blob: Option[Document.Blob] = |
132 if (is_theory) None |
132 if (is_theory) None |
133 else Some((Document.Blob(content.bytes, content.chunk, pending_edits.nonEmpty))) |
133 else Some((Document.Blob(content.bytes, content.chunk, pending_edits.nonEmpty))) |
|
134 |
|
135 |
|
136 /* bibtex entries */ |
|
137 |
|
138 def bibtex_entries: List[Text.Info[String]] = |
|
139 model.content.bibtex_entries |
134 |
140 |
135 |
141 |
136 /* edits */ |
142 /* edits */ |
137 |
143 |
138 def change_text(text: String, range: Option[Line.Range] = None): Option[Document_Model] = |
144 def change_text(text: String, range: Option[Line.Range] = None): Option[Document_Model] = |