mirror of
https://github.com/github/semantic.git
synced 2024-12-20 13:21:59 +03:00
Simplify how images and links are projected.
This commit is contained in:
parent
7d7e41221e
commit
3278506866
@ -105,10 +105,10 @@ text :: Assignment
|
||||
text = makeTerm <$> symbol Text <*> (Markup.Text <$> source)
|
||||
|
||||
link :: Assignment
|
||||
link = makeTerm <$> symbol Link <*> (uncurry Markup.Link <$> project (\ ((CMark.LINK url title :. _) :< _) -> (toS url, nullText title))) <* source
|
||||
link = makeTerm <$> symbol Link <*> project (\ ((CMark.LINK url title :. _) :< _) -> Markup.Link (toS url) (nullText title)) <* source
|
||||
|
||||
image :: Assignment
|
||||
image = makeTerm <$> symbol Image <*> (uncurry Markup.Image <$> project (\ ((CMark.IMAGE url title :. _) :< _) -> (toS url, nullText title))) <* source
|
||||
image = makeTerm <$> symbol Image <*> project (\ ((CMark.IMAGE url title :. _) :< _) -> Markup.Image (toS url) (nullText title)) <* source
|
||||
|
||||
code :: Assignment
|
||||
code = makeTerm <$> symbol Code <*> (Markup.Code Nothing <$> source)
|
||||
|
Loading…
Reference in New Issue
Block a user