Skip to main content
Commonmark migration
Source Link

###Table parser, code golf

Table parser, code golf

Input

|===========|=============|==============|
|Left align |  Right align| Center align |
|===========|=============|==============|
|This       |         This|     This     |
|-----------|-------------|--------------|
|                column                  |
|-----------|-------------|--------------|
|will       |                            |
|-----------|          will be           |
|be         |                            |
|-----------|-------------|--------------|
|left       |        right|    center    |
|-----------|-------------|--------------|
|aligned    |      aligned|   aligned    |
|-----------|-------------|--------------|
|and can be |    vertical-|              |
|multilined | align middle|  as default but a bit long line |
|with <br>  |             |              |
|-----------|-------------|--------------|

Output should be valid HTML. And I am thinking of following requirement specs.

  • alignments (left, right, middle)
  • border thickness (normal -, |, bold, =,||)
  • with table headers or without
  • rowspans, colspans
  • multiline & vertical-align is always middle

What do you think?

###Table parser, code golf

Input

|===========|=============|==============|
|Left align |  Right align| Center align |
|===========|=============|==============|
|This       |         This|     This     |
|-----------|-------------|--------------|
|                column                  |
|-----------|-------------|--------------|
|will       |                            |
|-----------|          will be           |
|be         |                            |
|-----------|-------------|--------------|
|left       |        right|    center    |
|-----------|-------------|--------------|
|aligned    |      aligned|   aligned    |
|-----------|-------------|--------------|
|and can be |    vertical-|              |
|multilined | align middle|  as default but a bit long line |
|with <br>  |             |              |
|-----------|-------------|--------------|

Output should be valid HTML. And I am thinking of following requirement specs.

  • alignments (left, right, middle)
  • border thickness (normal -, |, bold, =,||)
  • with table headers or without
  • rowspans, colspans
  • multiline & vertical-align is always middle

What do you think?

Table parser, code golf

Input

|===========|=============|==============|
|Left align |  Right align| Center align |
|===========|=============|==============|
|This       |         This|     This     |
|-----------|-------------|--------------|
|                column                  |
|-----------|-------------|--------------|
|will       |                            |
|-----------|          will be           |
|be         |                            |
|-----------|-------------|--------------|
|left       |        right|    center    |
|-----------|-------------|--------------|
|aligned    |      aligned|   aligned    |
|-----------|-------------|--------------|
|and can be |    vertical-|              |
|multilined | align middle|  as default but a bit long line |
|with <br>  |             |              |
|-----------|-------------|--------------|

Output should be valid HTML. And I am thinking of following requirement specs.

  • alignments (left, right, middle)
  • border thickness (normal -, |, bold, =,||)
  • with table headers or without
  • rowspans, colspans
  • multiline & vertical-align is always middle

What do you think?

Rollback to Revision 6
Source Link
YOU
  • 5k
  • 14
  • 8
|===========|=============|==============|
|Left align |  Right align| Center align |
|===========|=============|==============|
|This       |         This|     This     |
|-----------|-------------|--------------|
|left       |        right|    center    |
|-----------|-------------|--------------|
|aligned    |      aligned|   aligned    |
|-----------|-------------|--------------|
|===========|=============|==============|
|Left align |  Right align| Center align |
|===========|=============|==============|
|This       |         This|     This     |
|-----------|-------------|--------------|
|                column                  |
|-----------|-------------|--------------|
|will       |                            |
|-----------|          will be           |
|be         |                            |
|-----------|-------------|--------------|
|left       |        right|    center    |
|-----------|-------------|--------------|
|aligned    |      aligned|   aligned    |
|-----------|-------------|--------------|
|and can be |    vertical-|              |
|multilined | align middle|  as default but a bit long line |
|with <br>  |             |              |
|-----------|-------------|--------------|
  • alignments (left, right, middle)
  • border thickness (normal -, |, bold, =,||)
  • with table headers or without
  • EDIT: Removed (rowspans, colspans)rowspans, colspans
  • EDIT: Removed (multiline & vertical-align is always middle)multiline & vertical-align is always middle
|===========|=============|==============|
|Left align |  Right align| Center align |
|===========|=============|==============|
|This       |         This|     This     |
|-----------|-------------|--------------|
|left       |        right|    center    |
|-----------|-------------|--------------|
|aligned    |      aligned|   aligned    |
|-----------|-------------|--------------|
  • alignments (left, right, middle)
  • border thickness (normal -, |, bold, =,||)
  • with table headers or without
  • EDIT: Removed (rowspans, colspans)
  • EDIT: Removed (multiline & vertical-align is always middle)
|===========|=============|==============|
|Left align |  Right align| Center align |
|===========|=============|==============|
|This       |         This|     This     |
|-----------|-------------|--------------|
|                column                  |
|-----------|-------------|--------------|
|will       |                            |
|-----------|          will be           |
|be         |                            |
|-----------|-------------|--------------|
|left       |        right|    center    |
|-----------|-------------|--------------|
|aligned    |      aligned|   aligned    |
|-----------|-------------|--------------|
|and can be |    vertical-|              |
|multilined | align middle|  as default but a bit long line |
|with <br>  |             |              |
|-----------|-------------|--------------|
  • alignments (left, right, middle)
  • border thickness (normal -, |, bold, =,||)
  • with table headers or without
  • rowspans, colspans
  • multiline & vertical-align is always middle
removed rowsspan, colspans, multiline, and verticle align
Source Link
YOU
  • 5k
  • 14
  • 8

###Table parser, code golf

Input

|===========|=============|==============|
|Left align |  Right align| Center align |
|===========|=============|==============|
|This       |         This|     This     |
|-----------|-------------|--------------|
|                column                  |
|-----------|-------------|--------------|
|will       |                            |
|-----------|          will be           |
|be         |                            |
|-----------|-------------|--------------|
|left       |        right|    center    |
|-----------|-------------|--------------|
|aligned    |      aligned|   aligned    |
|-----------|-------------|--------------|
|and can be |    vertical-|              |
|multilined | align middle|  as default but a bit long line |
|with <br>  |             |              |
|-----------|-------------|--------------|

Output should be valid HTML. And I am thinking of following requirement specs.

  • alignments (left, right, middle)
  • border thickness (normal -, |, bold, =,||)
  • with table headers or without
  • rowspans, colspansEDIT: Removed (rowspans, colspans)
  • multiline & vertical-align is always middleEDIT: Removed (multiline & vertical-align is always middle)

What do you think?

###Table parser, code golf

Input

|===========|=============|==============|
|Left align |  Right align| Center align |
|===========|=============|==============|
|This       |         This|     This     |
|-----------|-------------|--------------|
|                column                  |
|-----------|-------------|--------------|
|will       |                            |
|-----------|          will be           |
|be         |                            |
|-----------|-------------|--------------|
|left       |        right|    center    |
|-----------|-------------|--------------|
|aligned    |      aligned|   aligned    |
|-----------|-------------|--------------|
|and can be |    vertical-|              |
|multilined | align middle|  as default but a bit long line |
|with <br>  |             |              |
|-----------|-------------|--------------|

Output should be valid HTML. And I am thinking of following requirement specs.

  • alignments (left, right, middle)
  • border thickness (normal -, |, bold, =,||)
  • with table headers or without
  • rowspans, colspans
  • multiline & vertical-align is always middle

What do you think?

###Table parser, code golf

Input

|===========|=============|==============|
|Left align |  Right align| Center align |
|===========|=============|==============|
|This       |         This|     This     |
|-----------|-------------|--------------|
|left       |        right|    center    |
|-----------|-------------|--------------|
|aligned    |      aligned|   aligned    |
|-----------|-------------|--------------|

Output should be valid HTML. And I am thinking of following requirement specs.

  • alignments (left, right, middle)
  • border thickness (normal -, |, bold, =,||)
  • with table headers or without
  • EDIT: Removed (rowspans, colspans)
  • EDIT: Removed (multiline & vertical-align is always middle)

What do you think?

Mod Removes Wiki by Martin EnderMod
Post Merged (destination) from meta.codegolf.stackexchange.com/questions/1847/…
Post Merged (destination) from meta.codegolf.stackexchange.com/questions/225/…
added 55 characters in body
Source Link
YOU
  • 5k
  • 14
  • 8
Loading
added 22 characters in body; added 7 characters in body; edited body
Source Link
YOU
  • 5k
  • 14
  • 8
Loading
edited body
Source Link
YOU
  • 5k
  • 14
  • 8
Loading
added 231 characters in body; edited body
Source Link
YOU
  • 5k
  • 14
  • 8
Loading
deleted 113 characters in body
Source Link
YOU
  • 5k
  • 14
  • 8
Loading
deleted 38 characters in body; deleted 33 characters in body
Source Link
YOU
  • 5k
  • 14
  • 8
Loading
Source Link
YOU
  • 5k
  • 14
  • 8
Loading
Post Made Community Wiki by YOU