Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

csv-table directive #9

Closed
19 tasks
Tracked by #2
Mpdreamz opened this issue Nov 6, 2024 · 1 comment
Closed
19 tasks
Tracked by #2

csv-table directive #9

Mpdreamz opened this issue Nov 6, 2024 · 1 comment
Labels
authoring Relates to our markdown parser

Comments

@Mpdreamz
Copy link
Member

Mpdreamz commented Nov 6, 2024

CSV Table

Kind Link
Reference https://mystmd.org/guide/directives#directive-csv-table
Documentation https://mystmd.org/guide/tables#csv-tables

The “csv-table” directive is used to create a table from CSV (comma-separated values) data.

Implementation

  • Parses directives and aliases
  • Emits HTML
  • Unit tests
  • Validation (emits, warnings and errors).

Specification compliance:

  • Arguments is parsed
  • Body is a raw string
  • Options:
    • label, name (string) - Label the directive to be cross-referenced or explicitly linked to.
    • enumerated, numbered (boolean) - Turn on/off the numbering for the specific code
    • enumerator, number (string) - Explicitly set the code number
    • header (string)
      Supplemental data for the table header, added independently of and before any header-rows from the main CSV data. Must use the same CSV format as the main CSV data.
    • header header-rows (number) - The number of rows of CSV data to use in the table header. Defaults to 0.
    • header class (string) - CSS classes to add to your table.
      • header - full-width: changes the table environment to cover two columns in LaTeX
    • align (string)
    • delim (string)
      The character used to separate data fields. The special values “tab” and “space” are converted to the respective whitespace characters. Defaults to “,” (comma)
    • keepspace (boolean)
      Treat whitespace immediately following the delimiter as significant. The default is to ignore such whitespace.
    • quote (string)
      The character used to quote fields containing special characters, such as the delimiter, quotes, or new-line characters. Must be a single character, defaults to " (a double quote)
      For example, First cell, "These commas, for example, are escaped", Next cell
    • escape (string)
      A character used to escape the delimiter or quote characters from the CSV parser. Must be a single character, defaults to " (a double quote) default is a double quote
      For example, First cell, "These quotes"", for example, are escaped", Next cell
@Mpdreamz Mpdreamz added enhancement authoring Relates to our markdown parser and removed enhancement labels Nov 6, 2024
@Mpdreamz
Copy link
Member Author

Closed by #57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
authoring Relates to our markdown parser
Projects
None yet
Development

No branches or pull requests

1 participant