Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gargantext-ihaskell
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
gargantext-ihaskell
Commits
a40d6bfb
Commit
a40d6bfb
authored
Jan 02, 2014
by
Andrew Gibiansky
Committed by
Adam Vogt
Jan 03, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing linting CSS/html to wrap when long code lines are used
parent
58401074
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
21 deletions
+19
-21
Lint.hs
IHaskell/Eval/Lint.hs
+19
-21
profile.tar
profile/profile.tar
+0
-0
No files found.
IHaskell/Eval/Lint.hs
View file @
a40d6bfb
...
...
@@ -73,38 +73,36 @@ plainSuggestion suggest =
(
whyNot
suggest
)
htmlSuggestions
::
[
LintSuggestion
]
->
String
htmlSuggestions
suggests
=
table
(
concatMap
toHtml
suggests
)
htmlSuggestions
=
concatMap
toHtml
where
toHtml
::
LintSuggestion
->
String
toHtml
suggest
=
row
(
el
$
style
"name"
$
suggestion
suggest
)
++
row
(
el
(
style
severityClass
"Found:"
++
-- Things that look like this get highlighted.
styleId
"highlight-code"
"haskell"
(
found
suggest
))
++
el
(
style
severityClass
"Why Not:"
++
styleId
"highlight-code"
"haskell"
(
whyNot
suggest
)))
toHtml
suggest
=
concat
[
named
$
suggestion
suggest
,
floating
"left"
$
style
severityClass
"Found:"
++
-- Things that look like this get highlighted.
styleId
"highlight-code"
"haskell"
(
found
suggest
),
floating
"left"
$
style
severityClass
"Why Not:"
++
-- Things that look like this get highlighted.
styleId
"highlight-code"
"haskell"
(
whyNot
suggest
)
]
where
severityClass
=
case
severity
suggest
of
LintWarning
->
"warning"
LintError
->
"error"
style
::
String
->
String
->
String
style
cls
thing
=
[
i
|
<div class="suggestion-${cls}">${thing}</div>
|]
style
cls
thing
=
[
i
|
<div class="suggestion-${cls}">${thing}</div>
|]
named
::
String
->
String
named
thing
=
[
i
|
<div class="suggestion-name" style="clear:both;">${thing}</div>
|]
styleId
::
String
->
String
->
String
->
String
styleId
cls
id
thing
=
[
i
|
<div class="${cls}" id="${id}">${thing}</div>
|]
styleId
cls
id
thing
=
[
i
|
<div class="${cls}" id="${id}">${thing}</div>
|]
table
::
String
->
String
table
thing
=
[
i
|
<table class="suggestion-table">${thing}</table>
|]
row
::
String
->
String
row
thing
=
[
i
|
<tr class="suggestion-row">${thing}</tr>
|]
el
::
String
->
String
el
thing
=
[
i
|
<td class="suggestion-cell">${thing}</td>
|]
floating
::
String
->
String
->
String
floating
dir
thing
=
[
i
|
<div class="suggestion-row" style="float: ${dir};">${thing}</div>
|]
-- | Parse a suggestion from Hlint. The suggestions look like this:
-- .ihaskell/.hlintFile.hs:1:19: Warning: Redundant bracket
...
...
profile/profile.tar
View file @
a40d6bfb
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment