diff options
Diffstat (limited to 'data')
-rw-r--r-- | data/default.theme | 177 | ||||
-rw-r--r-- | data/pandoc.lua | 52 |
2 files changed, 5 insertions, 224 deletions
diff --git a/data/default.theme b/data/default.theme deleted file mode 100644 index cf1bf53cd..000000000 --- a/data/default.theme +++ /dev/null @@ -1,177 +0,0 @@ -{ - "metadata" : { - "revision" : 1, - "name" : "Default", - "author" : "Kate Authors", - "license" : "MIT", - "read-only" : true - }, - "text-styles": { - "Normal" : { - "text-color" : "#1f1c1b", - "selected-text-color" : "#ffffff", - "bold" : false, - "italic" : false, - "underline" : false, - "strike-through" : false - }, - "Keyword" : { - "text-color" : "#1f1c1b", - "selected-text-color" : "#ffffff", - "bold" : true - }, - "Function" : { - "text-color" : "#644a9b", - "selected-text-color" : "#452886" - }, - "Variable" : { - "text-color" : "#0057ae", - "selected-text-color" : "#00316e" - }, - "ControlFlow" : { - "text-color" : "#1f1c1b", - "selected-text-color" : "#ffffff", - "bold" : true - }, - "Operator" : { - "text-color" : "#1f1c1b", - "selected-text-color" : "#ffffff" - }, - "BuiltIn" : { - "text-color" : "#644a9b", - "selected-text-color" : "#452886", - "bold" : true - }, - "Extension" : { - "text-color" : "#0095ff", - "selected-text-color" : "#ffffff", - "bold" : true - }, - "Preprocessor" : { - "text-color" : "#006e28", - "selected-text-color" : "#006e28" - }, - "Attribute" : { - "text-color" : "#0057ae", - "selected-text-color" : "#00316e" - }, - "Char" : { - "text-color" : "#924c9d", - "selected-text-color" : "#6c2477" - }, - "SpecialChar" : { - "text-color" : "#3daee9", - "selected-text-color" : "#fcfcfc" - }, - "String" : { - "text-color" : "#bf0303", - "selected-text-color" : "#9c0e0e" - }, - "VerbatimString" : { - "text-color" : "#bf0303", - "selected-text-color" : "#9c0e0e" - }, - "SpecialString" : { - "text-color" : "#ff5500", - "selected-text-color" : "#ff5500" - }, - "Import" : { - "text-color" : "#ff5500", - "selected-text-color" : "#ff5500" - }, - "DataType" : { - "text-color" : "#0057ae", - "selected-text-color" : "#00316e" - }, - "DecVal" : { - "text-color" : "#b08000", - "selected-text-color" : "#805c00" - }, - "BaseN" : { - "text-color" : "#b08000", - "selected-text-color" : "#805c00" - }, - "Float" : { - "text-color" : "#b08000", - "selected-text-color" : "#805c00" - }, - "Constant" : { - "text-color" : "#aa5500", - "selected-text-color" : "#5e2f00" - }, - "Comment" : { - "text-color" : "#898887", - "selected-text-color" : "#5e5d5d" - }, - "Documentation" : { - "text-color" : "#607880", - "selected-text-color" : "#46585e" - }, - "Annotation" : { - "text-color" : "#ca60ca", - "selected-text-color" : "#a44ea4" - }, - "CommentVar" : { - "text-color" : "#0095ff", - "selected-text-color" : "#ffffff" - }, - "RegionMarker" : { - "text-color" : "#0057ae", - "selected-text-color" : "#00316e", - "background-color" : "#e0e9f8" - }, - "Information" : { - "text-color" : "#b08000", - "selected-text-color" : "#805c00" - }, - "Warning" : { - "text-color" : "#bf0303", - "selected-text-color" : "#9c0e0e" - }, - "Alert" : { - "text-color" : "#bf0303", - "selected-text-color" : "#9c0e0e", - "background-color" : "#f7e6e6", - "bold" : true - }, - "Error" : { - "text-color" : "#bf0303", - "selected-text-color" : "#9c0e0e", - "underline" : true - }, - "Others" : { - "text-color" : "#006e28", - "selected-text-color" : "#006e28" - } - }, - "editor-colors": { - "background-color" : "#ffffff", - "code-folding" : "#94caef", - "bracket-matching" : "#ffff00", - "current-line" : "#f8f7f6", - "icon-border" : "#f0f0f0", - "indentation-line" : "#d2d2d2", - "line-numbers" : "#a0a0a0", - "current-line-number" : "#1e1e1e", - "mark-bookmark" : "#0000ff", - "mark-breakpoint-active" : "#ff0000", - "mark-breakpoint-reached" : "#ffff00", - "mark-breakpoint-disabled" : "#ff00ff", - "mark-execution" : "#a0a0a4", - "mark-warning" : "#00ff00", - "mark-error" : "#ff0000", - "modified-lines" : "#fdbc4b", - "replace-highlight" : "#00ff00", - "saved-lines" : "#2ecc71", - "search-highlight" : "#ffff00", - "selection" : "#94caef", - "separator" : "#898887", - "spell-checking" : "#bf0303", - "tab-marker" : "#d2d2d2", - "template-background" : "#d6d2d0", - "template-placeholder" : "#baf8ce", - "template-focused-placeholder" : "#76da98", - "template-read-only-placeholder" : "#f6e6e6", - "word-wrap-marker" : "#ededed" - } -} diff --git a/data/pandoc.lua b/data/pandoc.lua index 3be3b507a..98d274cf4 100644 --- a/data/pandoc.lua +++ b/data/pandoc.lua @@ -874,53 +874,6 @@ M.UpperAlpha = "UpperAlpha" -- Helper Functions -- @section helpers ---- Parse the given string into a Pandoc document. --- The method used to interpret input is specified by *format*. Acceptable --- values for this parameter are equal to those that can be given to the --- `--from` command line option. --- @tparam string markup the markup to be parsed --- @tparam[opt] string format format specification, defaults to "markdown". --- @treturn Pandoc pandoc document --- @usage --- local org_markup = "/emphasis/" -- Input to be read --- local document = pandoc.read(org_markup, "org") --- -- Get the first block of the document --- local block = document.blocks[1] --- -- The inline element in that block is an `Emph` --- assert(block.content[1].t == "Emph") -function M.read(markup, format) - format = format or "markdown" - local pd = pandoc._read(format, markup) - if type(pd) == "string" then - error(pd) - else - return pd - end -end - ---- Runs command with arguments, passing it some input, and returns the output. --- @treturn string Output of command. --- @raise A table containing the keys `command`, `error_code`, and `output` is --- thrown if the command exits with a non-zero error code. --- @usage --- local ec, output = pandoc.pipe("sed", {"-e","s/a/b/"}, "abc") -function M.pipe (command, args, input) - local ec, output = pandoc._pipe(command, args, input) - if ec ~= 0 then - err = setmetatable( - { command = command, error_code = ec, output = output}, - { __tostring = function(e) - return "Error running " .. e.command - .. " (error code " .. e.error_code .. "): " - .. e.output - end - } - ) - error(err) - end - return output -end - --- Use functions defined in the global namespace to create a pandoc filter. -- All globally defined functions which have names of pandoc elements are -- collected into a new table. @@ -950,4 +903,9 @@ function M.global_filter() return res end +------------------------------------------------------------------------ +-- Functions which have moved to different modules +local utils = require 'pandoc.utils' +M.sha1 = utils.sha1 + return M |