@@ -214,27 +214,27 @@ func (gp *graphProperties) parseString(line string) ([]textNode, error) {
214214 },
215215 },
216216 {
217- regex : regexp .MustCompile (`(?s)^(.+)\s+ -->\s+ (.+)$` ),
217+ regex : regexp .MustCompile (`(?s)^(.+)\s* -->\s*\|(.+)\|\s* (.+)$` ),
218218 handler : func (match []string ) ([]textNode , error ) {
219219 if lhs , err = gp .parseString (match [0 ]); err != nil {
220220 lhs = []textNode {parseNode (match [0 ])}
221221 }
222- if rhs , err = gp .parseString (match [1 ]); err != nil {
223- rhs = []textNode {parseNode (match [1 ])}
222+ if rhs , err = gp .parseString (match [2 ]); err != nil {
223+ rhs = []textNode {parseNode (match [2 ])}
224224 }
225- return setArrow (lhs , rhs , gp ), nil
225+ return setArrowWithLabel (lhs , rhs , match [ 1 ] , gp ), nil
226226 },
227227 },
228228 {
229- regex : regexp .MustCompile (`(?s)^(.+)\s+ -->\|(.+)\|\s+ (.+)$` ),
229+ regex : regexp .MustCompile (`(?s)^(.+)\s* -->\s* (.+)$` ),
230230 handler : func (match []string ) ([]textNode , error ) {
231231 if lhs , err = gp .parseString (match [0 ]); err != nil {
232232 lhs = []textNode {parseNode (match [0 ])}
233233 }
234- if rhs , err = gp .parseString (match [2 ]); err != nil {
235- rhs = []textNode {parseNode (match [2 ])}
234+ if rhs , err = gp .parseString (match [1 ]); err != nil {
235+ rhs = []textNode {parseNode (match [1 ])}
236236 }
237- return setArrowWithLabel (lhs , rhs , match [ 1 ] , gp ), nil
237+ return setArrow (lhs , rhs , gp ), nil
238238 },
239239 },
240240 {
0 commit comments