Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
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
1
Merge Requests
1
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
Przemyslaw Kaminski
purescript-gargantext
Commits
b71b0ad0
Commit
b71b0ad0
authored
Nov 26, 2020
by
Nicolas Pouillard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more refactorings
parent
793df052
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
11 deletions
+6
-11
Core.purs
src/Gargantext/Components/NgramsTable/Core.purs
+6
-11
No files found.
src/Gargantext/Components/NgramsTable/Core.purs
View file @
b71b0ad0
...
@@ -96,7 +96,7 @@ import Data.List ((:), List(Nil))
...
@@ -96,7 +96,7 @@ import Data.List ((:), List(Nil))
import Data.List as List
import Data.List as List
import Data.Map (Map)
import Data.Map (Map)
import Data.Map as Map
import Data.Map as Map
import Data.Maybe (Maybe(..), fromMaybe, isJust)
import Data.Maybe (Maybe(..), fromMaybe,
fromMaybe',
isJust)
import Data.Monoid.Additive (Additive(..))
import Data.Monoid.Additive (Additive(..))
import Data.Newtype (class Newtype)
import Data.Newtype (class Newtype)
import Data.Set (Set)
import Data.Set (Set)
...
@@ -108,7 +108,7 @@ import Data.String.Regex.Flags (global, multiline) as R
...
@@ -108,7 +108,7 @@ import Data.String.Regex.Flags (global, multiline) as R
import Data.String.Utils as SU
import Data.String.Utils as SU
import Data.Symbol (SProxy(..))
import Data.Symbol (SProxy(..))
import Data.These (These(..))
import Data.These (These(..))
import Data.Traversable (for, traverse_)
import Data.Traversable (for, traverse_
, traverse
)
import Data.TraversableWithIndex (traverseWithIndex)
import Data.TraversableWithIndex (traverseWithIndex)
import Data.Tuple (Tuple(..))
import Data.Tuple (Tuple(..))
import Data.Tuple.Nested ((/\))
import Data.Tuple.Nested ((/\))
...
@@ -498,15 +498,10 @@ highlightNgrams ntype table@(NgramsTable {ngrams_repo_elements: elts}) input0 =
...
@@ -498,15 +498,10 @@ highlightNgrams ntype table@(NgramsTable {ngrams_repo_elements: elts}) input0 =
-- Skip this pattern which is overlapping with a previous one.
-- Skip this pattern which is overlapping with a previous one.
{ i0, s, l }
{ i0, s, l }
| otherwise =
| otherwise =
case List.fromFoldable pis of
let pats' = fromMaybe' (\_ -> crashWith "highlightNgrams: out of bounds pattern") (traverse (A.index pats) pis) in
Nil ->
case List.fromFoldable pats' of
{ i0, s, l }
Nil -> { i0, s, l }
pi : _ ->
pat : _ -> goAcc pat i acc
case A.index pats pi of
Nothing ->
crashWith "highlightNgrams: out of bounds pattern"
Just pat ->
goAcc pat i acc
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
...
...
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