flex-tasks-processing-0.1
Safe HaskellNone
LanguageHaskell2010

FlexTask.Processing.Text

Description

Various text processing functions used to format input for display.

Synopsis

Control Sequences

Student answers for FlexTasks are compiled into a single String after retrieval. The answer String contains control sequences which encode the structure of the input form.

argDelimiter :: Text Source #

Outer delimiter for individual fields.

listDelimiter :: Text Source #

Inner delimiter for elements of a field list.

inputEscape :: Text Source #

Sequence denoting the start and end of a fields value.

missingMarker :: Text Source #

Marker for a missing field

emptyMarker :: Text Source #

Marker for a blank optional field

Formatting Functions

formatAnswer :: [[Text]] -> Maybe Text Source #

format a list of (nested) individual answers into a single answer String

formatIfFlexSubmission :: Text -> Text Source #

Format an answer String into a vertical text listing of individual values. This is used to display Flex submissions in a non-HTML context, e.g. in a downloadable text file.

formatForJS :: Text -> Text Source #

Process Text containing Haskell Unicode representation for use in JavaScript.

removeUnicodeEscape :: String -> String Source #

Remove excessive escape characters in front of Unicode caused by conversion between Haskell and JavaScript representation.

Internationalization

supportedLanguages :: [Lang] Source #

List of languages to cover for input form HTML in instances of RenderMessage for custom translations.