1
1
mirror of https://github.com/github/semantic.git synced 2024-12-19 12:51:52 +03:00

Clean up Markdown assignments a little with token rules.

This commit is contained in:
Rob Rix 2017-08-16 10:30:25 -04:00
parent 039789d32a
commit fb7791f852

View File

@ -90,7 +90,7 @@ codeBlock :: Assignment
codeBlock = makeTerm <$> symbol CodeBlock <*> (project (\ (Node (CMarkGFM.CODE_BLOCK language _) _ _ Term.:< _) -> Markup.Code (nullText language)) <*> source)
thematicBreak :: Assignment
thematicBreak = makeTerm <$> symbol ThematicBreak <*> pure Markup.ThematicBreak <* source
thematicBreak = makeTerm <$> token ThematicBreak <*> pure Markup.ThematicBreak
htmlBlock :: Assignment
htmlBlock = makeTerm <$> symbol HTMLBlock <*> (Markup.HTMLBlock <$> source)
@ -134,10 +134,10 @@ code :: Assignment
code = makeTerm <$> symbol Code <*> (Markup.Code Nothing <$> source)
lineBreak :: Assignment
lineBreak = makeTerm <$> symbol LineBreak <*> pure Markup.LineBreak <* source
lineBreak = makeTerm <$> token LineBreak <*> pure Markup.LineBreak
softBreak :: Assignment
softBreak = makeTerm <$> symbol SoftBreak <*> pure Markup.LineBreak <* source
softBreak = makeTerm <$> token SoftBreak <*> pure Markup.LineBreak
-- Implementation details