1. 21 Jun, 2022 1 commit
    • Viktor Söderqvist's avatar
      Module API docs corrections (#10890) · 02acb8fd
      Viktor Söderqvist authored
      * Fix typo `RedisModule_CreatString` -> `RedisModule_CreateString` (multiple occurrences)
      * Make the markdown gen script change all `RM_` to `RedisModule_` even in code examples, etc.
      02acb8fd
  2. 08 Jun, 2022 1 commit
  3. 03 May, 2022 1 commit
  4. 28 Apr, 2022 1 commit
  5. 05 Feb, 2022 1 commit
  6. 03 Feb, 2022 1 commit
    • Viktor Söderqvist's avatar
      Add 'Available since' to module API function docs (#10229) · f4ecc799
      Viktor Söderqvist authored
      The script which generates the markdown docs from module.c is updated to include
      the version in which each module API function was introduced.
      
      The script uses git tags to find this information. If git is not available or if we're not in
      a git repo, the 'since' is silently skipped.
      
      The line `**Available since:** (version)` is added after the function prototype
      
      Rename to utils/generate-module-api-doc.rb
      f4ecc799
  7. 19 Apr, 2021 1 commit
  8. 13 Apr, 2021 1 commit
    • Viktor Söderqvist's avatar
      Modules API docs: Sections and links (#8442) · d7920ff9
      Viktor Söderqvist authored
      * Modules API docs: Link API function names to their definitions
      
      Occurrences of API functions are linked to their definition.
      
      A function index with links to all functions is added on the bottom
      of the page.
      
      Comment blocks in module.c starting with a markdown h2 heading are
      used as sections. A table of contents is generated from these
      headings.
      
      The functions names are changed from h2 to h3, since they are now
      rendered as sub-headings within each section.
      
      Existing sections in module.c are used with some minor changes.
      Some documentation text is added or sligtly modified.
      
      The markdown renderer will add IDs which may clash with our
      generated IDs. By prefixing section IDs with "section-" we make
      them different.
      
      Replace double dashes with a unicode long ndash
      d7920ff9
  9. 20 Jan, 2021 1 commit
    • Viktor Söderqvist's avatar
      More modules API ref formatting fixes (#8344) · 16258f21
      Viktor Söderqvist authored
      Fix broken formatting in `RM_Call` and `RM_CreateDataType`,
      `RM_SubscribeToServerEvent` (nested lists, etc. in list items).
      
      Unhide docs of `RM_LoadDataTypeFromString` and
      `RM_SaveDataTypeToString` by removing blank line between docs and
      function.
      
      Clarification added to `RM__Assert`: Recommentation to use the
      `RedisModule_Assert` macro instead.
      
      All names containing underscores (variable and macro names) are
      wrapped in backticks (if not already wrapped in backticks). This
      prevents underscore from being interpreted as italics in some
      cases.
      
      Names including a wildcard star, e.g. RM_Defrag*(), is wrapped in
      backticks (and RM replaced by RedisModule in this case). This
      prevents the * from being interpreted as an italics marker.
      
      A list item with a sublist, a paragraph and another sublist is a
      combination which seems impossible to achieve with RedCarped
      markdown, so the one occurrence of this is rewritten.
      
      Various trivial changes (typos, backticks, etc.).
      
      Ruby script:
      
      * Replace `RM_Xyz` with `RedisModule_Xyz` in docs. (RM is correct
        when refering to the C code but RedisModule is correct in the
        API docs.)
      * Automatic backquotes around C functions like `malloc()`.
      * Turn URLs into links. The link text is the URL itself.
      * Don't add backticks inside bold (**...**)
      16258f21
  10. 15 Jan, 2021 1 commit
    • Viktor Söderqvist's avatar
      Modules API reference formatting fixes · ebf20b83
      Viktor Söderqvist authored
      Fixes markdown formatting errors and some functions not showing
      up in the generated documentation at all.
      
      Ruby script (gendoc.rb) fixes:
      
      * Modified automatic instertion of backquotes:
        * Don't add backquotes around names which are already preceded by a
          backquote. Fixes for example \`RedisModule_Reply\*\` which turning
          into \`\`RedisModule_Reply\`\*\` messes up the formatting.
        * Add backquotes around types such as RedisModuleString (in addition
          to function names `RedisModule_[A-z()]*` and macro names
          `REDISMODULE_[A-z]*`).
        * Require 4 spaces indentation for disabling automatic backquotes, i.e.
          code blocks. Fixes continuations of list items (indented 2 spaces).
      * More permissive extraction of doc comments:
        * Allow doc comments starting with `/**`.
        * Make space before `*` on each line optional.
        * Make space after `/*` and `/**` optional (needed when appearing on
          its own line).
      
      Markdown fixes in module.c:
      
      * Fix code blocks not indented enough (4 spaces needed).
      * Add black line before code blocks and lists where missing (needed).
      * Enclose special markdown characters `_*^<>` in backticks to prevent them
        from messing up formatting.
      * Lists with `1)` changed to `1.` for proper markdown lists.
      * Remove excessive indentation which causes text to be unintentionally
        rendered as code blocks.
      * Other minor formatting fixes.
      
      Other fixes in module.c:
      
      * Remove blank lines between doc comment and function definition. A blank
        line here makes the Ruby script exclude the function in docs.
      ebf20b83
  11. 03 Jul, 2018 1 commit
  12. 14 Jul, 2017 1 commit
  13. 10 May, 2016 2 commits