mirror of
https://github.com/IHaskell/IHaskell.git
synced 2025-04-16 19:36:06 +00:00
IHaskell.Eval.Lint: escape $
This commit is contained in:
parent
f48eeee91c
commit
c13b973a46
@ -212,12 +212,13 @@ htmlSuggestions = concatMap toHtml
|
||||
[ named $ suggestion suggest
|
||||
, floating "left" $ styl severityClass "Found:" ++
|
||||
-- Things that look like this get highlighted.
|
||||
styleId "highlight-code" "haskell" (found suggest)
|
||||
styleId "highlight-code" "haskell" (escapeDollar $ found suggest)
|
||||
, floating "left" $ styl severityClass "Why Not:" ++
|
||||
-- Things that look like this get highlighted.
|
||||
styleId "highlight-code" "haskell" (whyNot suggest)
|
||||
styleId "highlight-code" "haskell" (escapeDollar $ whyNot suggest)
|
||||
]
|
||||
where
|
||||
escapeDollar = replace "$" "\\$"
|
||||
severityClass =
|
||||
case severity suggest of
|
||||
Error -> "error"
|
||||
|
@ -894,14 +894,14 @@
|
||||
".suggestion-name {\n",
|
||||
"font-weight: bold;\n",
|
||||
"}\n",
|
||||
"</style><div class=\"suggestion-name\" style=\"clear:both;\">Redundant $</div><div class=\"suggestion-row\" style=\"float: left;\"><div class=\"suggestion-warning\">Found:</div><div class=\"highlight-code\" id=\"haskell\">f $ 3</div></div><div class=\"suggestion-row\" style=\"float: left;\"><div class=\"suggestion-warning\">Why Not:</div><div class=\"highlight-code\" id=\"haskell\">f 3</div></div><div class=\"suggestion-name\" style=\"clear:both;\">Redundant do</div><div class=\"suggestion-row\" style=\"float: left;\"><div class=\"suggestion-warning\">Found:</div><div class=\"highlight-code\" id=\"haskell\">do return 3</div></div><div class=\"suggestion-row\" style=\"float: left;\"><div class=\"suggestion-warning\">Why Not:</div><div class=\"highlight-code\" id=\"haskell\">return 3</div></div>"
|
||||
"</style><div class=\"suggestion-name\" style=\"clear:both;\">Redundant $</div><div class=\"suggestion-row\" style=\"float: left;\"><div class=\"suggestion-warning\">Found:</div><div class=\"highlight-code\" id=\"haskell\">f \\$ 3</div></div><div class=\"suggestion-row\" style=\"float: left;\"><div class=\"suggestion-warning\">Why Not:</div><div class=\"highlight-code\" id=\"haskell\">f 3</div></div><div class=\"suggestion-name\" style=\"clear:both;\">Redundant do</div><div class=\"suggestion-row\" style=\"float: left;\"><div class=\"suggestion-warning\">Found:</div><div class=\"highlight-code\" id=\"haskell\">do return 3</div></div><div class=\"suggestion-row\" style=\"float: left;\"><div class=\"suggestion-warning\">Why Not:</div><div class=\"highlight-code\" id=\"haskell\">return 3</div></div>"
|
||||
],
|
||||
"text/plain": [
|
||||
"Line 1: Redundant $\n",
|
||||
"Line 7: Redundant $\n",
|
||||
"Found:\n",
|
||||
"f $ 3\n",
|
||||
"Why not:\n",
|
||||
"f 3Line 1: Redundant do\n",
|
||||
"f 3Line 9: Redundant do\n",
|
||||
"Found:\n",
|
||||
"do return 3\n",
|
||||
"Why not:\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user