diff --git a/docs/syntax/packet.md b/docs/syntax/packet.md index 55513e64c..c42aecc69 100644 --- a/docs/syntax/packet.md +++ b/docs/syntax/packet.md @@ -28,7 +28,7 @@ start-end: "Block name" %% Multi-bit blocks Using start and end bit counts can be difficult, especially when modifying a design. For this we add a bit count field, which starts from the end of the previous field automagically. Use `+` to set the number of bits, thus: ``` -packet-beta +packet +1: "Block name" %% Single-bit block +8: "Block name" %% 8-bit block 9-15: "Manually set start and end, it's fine to mix and match" diff --git a/packages/examples/src/examples/packet.ts b/packages/examples/src/examples/packet.ts index 0ec0a32d2..7acb97256 100644 --- a/packages/examples/src/examples/packet.ts +++ b/packages/examples/src/examples/packet.ts @@ -11,7 +11,7 @@ export default { code: `--- title: "TCP Packet" --- -packet-beta +packet 0-15: "Source Port" 16-31: "Destination Port" 32-63: "Sequence Number" diff --git a/packages/mermaid/src/diagrams/packet/packet.spec.ts b/packages/mermaid/src/diagrams/packet/packet.spec.ts index 274497eee..b03ffe4d1 100644 --- a/packages/mermaid/src/diagrams/packet/packet.spec.ts +++ b/packages/mermaid/src/diagrams/packet/packet.spec.ts @@ -73,7 +73,7 @@ describe('packet diagrams', () => { }); it('should handle bit counts', async () => { - const str = `packet-beta + const str = `packet +8: "byte" +16: "word" `; @@ -99,7 +99,7 @@ describe('packet diagrams', () => { }); it('should handle bit counts with bit or bits', async () => { - const str = `packet-beta + const str = `packet +8: "byte" +16: "word" `; @@ -211,7 +211,7 @@ describe('packet diagrams', () => { }); it('should throw error if numbers are not continuous with bit counts', async () => { - const str = `packet-beta + const str = `packet +16: "test" 18-20: "error" `; @@ -231,7 +231,7 @@ describe('packet diagrams', () => { }); it('should throw error if numbers are not continuous for single packets with bit counts', async () => { - const str = `packet-beta + const str = `packet +16: "test" 18: "error" `; @@ -262,7 +262,7 @@ describe('packet diagrams', () => { }); it('should throw error if bit count is 0', async () => { - const str = `packet-beta + const str = `packet +0: "test" `; await expect(parser.parse(str)).rejects.toThrowErrorMatchingInlineSnapshot( diff --git a/packages/mermaid/src/docs/syntax/packet.md b/packages/mermaid/src/docs/syntax/packet.md index 3a47823c1..375ff81d3 100644 --- a/packages/mermaid/src/docs/syntax/packet.md +++ b/packages/mermaid/src/docs/syntax/packet.md @@ -22,7 +22,7 @@ start-end: "Block name" %% Multi-bit blocks Using start and end bit counts can be difficult, especially when modifying a design. For this we add a bit count field, which starts from the end of the previous field automagically. Use `+` to set the number of bits, thus: ``` -packet-beta +packet +1: "Block name" %% Single-bit block +8: "Block name" %% 8-bit block 9-15: "Manually set start and end, it's fine to mix and match" diff --git a/packages/mermaid/src/mermaidAPI.spec.ts b/packages/mermaid/src/mermaidAPI.spec.ts index e1ba8d9da..819e256d6 100644 --- a/packages/mermaid/src/mermaidAPI.spec.ts +++ b/packages/mermaid/src/mermaidAPI.spec.ts @@ -794,7 +794,7 @@ graph TD;A--x|text including URL space|B;`) { textDiagramType: 'gantt', expectedType: 'gantt' }, { textDiagramType: 'journey', expectedType: 'journey' }, { textDiagramType: 'pie', expectedType: 'pie' }, - { textDiagramType: 'packet-beta', expectedType: 'packet' }, + { textDiagramType: 'packet', expectedType: 'packet' }, { textDiagramType: 'packet', expectedType: 'packet' }, { textDiagramType: 'xychart-beta', expectedType: 'xychart' }, { textDiagramType: 'requirementDiagram', expectedType: 'requirement' },