Skip to content

Commit

Permalink
fix: issue 2074 - tables are rendered differently in a list
Browse files Browse the repository at this point in the history
  • Loading branch information
Jose Fernando Gomez Flores committed Dec 13, 2023
1 parent a0cf241 commit ce174d7
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,37 @@ export class FlavoredMarkdownDemoComponent {
+ subline
+ second subline
## Primary cluster settings:
- **Instance size** is the size of each node in the [primary cluster](nmr1658424425362.md). This size determines the number of [units consumed](tdv1682522711429.md) per instance per hour. Select the best size to optimize costs for your compute and resource needs.
|Instance size|Lake units|Lake+ units|
|--------------|-----------|------------|
|XSmall|2.0|2.4|
|Small|4.0|4.8|
|Medium|7.0|8.4|
|Large|10.0|12.0|
|XLarge|13.0|15.6|
|XXLarge|20.0|24.0|
|XXXL (Azure only)|27.0|32.4|
- **Instance count**: The number of nodes in the primary cluster (2 to 64).
- **Instance storage**: 1 to 72 TB of storage per node.
**Size**: Number of nodes in each compute cluster. Consumption units are calculated per cluster, per hour.
|Node size|Lake units|Lake+ units|
|----------|-----------|------------|
|XSmall (1 node)|10|12|
|Small (2 nodes)|20|24|
|Medium (4 nodes)|40|48|
|Large (8 nodes)|80|96|
|XLarge (16 nodes)|160|192|
|XXLarge (32 nodes)|320|384|
## Table
|Connects to|With connector|
Expand Down
3 changes: 3 additions & 0 deletions libs/markdown-flavored/src/lib/flavored-markdown.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,8 @@ export class TdFlavoredMarkdownComponent
}

private _replaceTables(markdown: string): string {
console.log(markdown);
markdown = markdown.replaceAll(' |', '');
const tableRgx =
/^ {0,3}\|?.+\|.+\n[ \t]{0,3}\|?[ \t]*:?[ \t]*(?:-|=){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:-|=){2,}[\s\S]+?(?:\n\n|~0)/gm;
return this._replaceComponent(
Expand All @@ -502,6 +504,7 @@ export class TdFlavoredMarkdownComponent
componentRef: ComponentRef<TdFlavoredMarkdownTableComponent>,
match: string
) => {
console.log(match);
const dataTableLines: string[] = match
.replace(/(\s|\t)*\n+(\s|\t)*$/g, '')
.split('\n');
Expand Down

0 comments on commit ce174d7

Please sign in to comment.