diff --git a/examples/blog/go.mod b/examples/blog/go.mod index 0bd1c78..387d4ef 100644 --- a/examples/blog/go.mod +++ b/examples/blog/go.mod @@ -4,13 +4,7 @@ go 1.26.1 require github.com/andrioid/gastro v0.0.0 -require ( - github.com/alecthomas/chroma/v2 v2.23.1 // indirect - github.com/dlclark/regexp2 v1.11.5 // indirect - github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect - github.com/yuin/goldmark v1.8.2 // indirect - github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc // indirect -) +require github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect replace github.com/andrioid/gastro => ../.. diff --git a/examples/blog/go.sum b/examples/blog/go.sum index 30c97a4..0be9157 100644 --- a/examples/blog/go.sum +++ b/examples/blog/go.sum @@ -1,28 +1,2 @@ -github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0= -github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= -github.com/alecthomas/chroma/v2 v2.2.0/go.mod h1:vf4zrexSH54oEjJ7EdB65tGNHmH3pGZmVkgTP5RHvAs= -github.com/alecthomas/chroma/v2 v2.23.1 h1:nv2AVZdTyClGbVQkIzlDm/rnhk1E9bU9nXwmZ/Vk/iY= -github.com/alecthomas/chroma/v2 v2.23.1/go.mod h1:NqVhfBR0lte5Ouh3DcthuUCTUpDC9cxBOfyMbMQPs3o= -github.com/alecthomas/repr v0.0.0-20220113201626-b1b626ac65ae/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= -github.com/alecthomas/repr v0.5.2 h1:SU73FTI9D1P5UNtvseffFSGmdNci/O6RsqzeXJtP0Qs= -github.com/alecthomas/repr v0.5.2/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= -github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= -github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ= -github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= -github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= -github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/yuin/goldmark v1.4.15/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yuin/goldmark v1.8.2 h1:kEGpgqJXdgbkhcOgBxkC0X0PmoPG1ZyoZ117rDVp4zE= -github.com/yuin/goldmark v1.8.2/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg= -github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc h1:+IAOyRda+RLrxa1WC7umKOZRsGq4QrFFMYApOeHzQwQ= -github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc/go.mod h1:ovIvrum6DQJA4QsJSovrkC4saKHQVs7TvcaeO8AIl5I= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/examples/dashboard/go.mod b/examples/dashboard/go.mod index a1a7f62..274b16d 100644 --- a/examples/dashboard/go.mod +++ b/examples/dashboard/go.mod @@ -4,13 +4,7 @@ go 1.26.1 require github.com/andrioid/gastro v0.0.0 -require ( - github.com/alecthomas/chroma/v2 v2.23.1 // indirect - github.com/dlclark/regexp2 v1.11.5 // indirect - github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect - github.com/yuin/goldmark v1.8.2 // indirect - github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc // indirect -) +require github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect replace github.com/andrioid/gastro => ../.. diff --git a/examples/dashboard/go.sum b/examples/dashboard/go.sum index 30c97a4..0be9157 100644 --- a/examples/dashboard/go.sum +++ b/examples/dashboard/go.sum @@ -1,28 +1,2 @@ -github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0= -github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= -github.com/alecthomas/chroma/v2 v2.2.0/go.mod h1:vf4zrexSH54oEjJ7EdB65tGNHmH3pGZmVkgTP5RHvAs= -github.com/alecthomas/chroma/v2 v2.23.1 h1:nv2AVZdTyClGbVQkIzlDm/rnhk1E9bU9nXwmZ/Vk/iY= -github.com/alecthomas/chroma/v2 v2.23.1/go.mod h1:NqVhfBR0lte5Ouh3DcthuUCTUpDC9cxBOfyMbMQPs3o= -github.com/alecthomas/repr v0.0.0-20220113201626-b1b626ac65ae/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= -github.com/alecthomas/repr v0.5.2 h1:SU73FTI9D1P5UNtvseffFSGmdNci/O6RsqzeXJtP0Qs= -github.com/alecthomas/repr v0.5.2/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= -github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= -github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ= -github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= -github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= -github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/yuin/goldmark v1.4.15/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yuin/goldmark v1.8.2 h1:kEGpgqJXdgbkhcOgBxkC0X0PmoPG1ZyoZ117rDVp4zE= -github.com/yuin/goldmark v1.8.2/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg= -github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc h1:+IAOyRda+RLrxa1WC7umKOZRsGq4QrFFMYApOeHzQwQ= -github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc/go.mod h1:ovIvrum6DQJA4QsJSovrkC4saKHQVs7TvcaeO8AIl5I= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/examples/gastro/go.mod b/examples/gastro/go.mod index 43fd766..752e8f1 100644 --- a/examples/gastro/go.mod +++ b/examples/gastro/go.mod @@ -4,13 +4,7 @@ go 1.26.1 require github.com/andrioid/gastro v0.0.0 -require ( - github.com/alecthomas/chroma/v2 v2.23.1 // indirect - github.com/dlclark/regexp2 v1.11.5 // indirect - github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect - github.com/yuin/goldmark v1.8.2 // indirect - github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc // indirect -) +require github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect replace github.com/andrioid/gastro => ../.. diff --git a/examples/gastro/go.sum b/examples/gastro/go.sum index 30c97a4..0be9157 100644 --- a/examples/gastro/go.sum +++ b/examples/gastro/go.sum @@ -1,28 +1,2 @@ -github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0= -github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= -github.com/alecthomas/chroma/v2 v2.2.0/go.mod h1:vf4zrexSH54oEjJ7EdB65tGNHmH3pGZmVkgTP5RHvAs= -github.com/alecthomas/chroma/v2 v2.23.1 h1:nv2AVZdTyClGbVQkIzlDm/rnhk1E9bU9nXwmZ/Vk/iY= -github.com/alecthomas/chroma/v2 v2.23.1/go.mod h1:NqVhfBR0lte5Ouh3DcthuUCTUpDC9cxBOfyMbMQPs3o= -github.com/alecthomas/repr v0.0.0-20220113201626-b1b626ac65ae/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= -github.com/alecthomas/repr v0.5.2 h1:SU73FTI9D1P5UNtvseffFSGmdNci/O6RsqzeXJtP0Qs= -github.com/alecthomas/repr v0.5.2/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= -github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= -github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ= -github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= -github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= -github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/yuin/goldmark v1.4.15/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yuin/goldmark v1.8.2 h1:kEGpgqJXdgbkhcOgBxkC0X0PmoPG1ZyoZ117rDVp4zE= -github.com/yuin/goldmark v1.8.2/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg= -github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc h1:+IAOyRda+RLrxa1WC7umKOZRsGq4QrFFMYApOeHzQwQ= -github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc/go.mod h1:ovIvrum6DQJA4QsJSovrkC4saKHQVs7TvcaeO8AIl5I= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/examples/sse/go.mod b/examples/sse/go.mod index 89c40ae..cb7be9d 100644 --- a/examples/sse/go.mod +++ b/examples/sse/go.mod @@ -4,13 +4,7 @@ go 1.26.1 require github.com/andrioid/gastro v0.0.0 -require ( - github.com/alecthomas/chroma/v2 v2.23.1 // indirect - github.com/dlclark/regexp2 v1.11.5 // indirect - github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect - github.com/yuin/goldmark v1.8.2 // indirect - github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc // indirect -) +require github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect replace github.com/andrioid/gastro => ../.. diff --git a/examples/sse/go.sum b/examples/sse/go.sum index 30c97a4..0be9157 100644 --- a/examples/sse/go.sum +++ b/examples/sse/go.sum @@ -1,28 +1,2 @@ -github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0= -github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= -github.com/alecthomas/chroma/v2 v2.2.0/go.mod h1:vf4zrexSH54oEjJ7EdB65tGNHmH3pGZmVkgTP5RHvAs= -github.com/alecthomas/chroma/v2 v2.23.1 h1:nv2AVZdTyClGbVQkIzlDm/rnhk1E9bU9nXwmZ/Vk/iY= -github.com/alecthomas/chroma/v2 v2.23.1/go.mod h1:NqVhfBR0lte5Ouh3DcthuUCTUpDC9cxBOfyMbMQPs3o= -github.com/alecthomas/repr v0.0.0-20220113201626-b1b626ac65ae/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= -github.com/alecthomas/repr v0.5.2 h1:SU73FTI9D1P5UNtvseffFSGmdNci/O6RsqzeXJtP0Qs= -github.com/alecthomas/repr v0.5.2/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= -github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= -github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ= -github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= -github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= -github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/yuin/goldmark v1.4.15/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yuin/goldmark v1.8.2 h1:kEGpgqJXdgbkhcOgBxkC0X0PmoPG1ZyoZ117rDVp4zE= -github.com/yuin/goldmark v1.8.2/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg= -github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc h1:+IAOyRda+RLrxa1WC7umKOZRsGq4QrFFMYApOeHzQwQ= -github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc/go.mod h1:ovIvrum6DQJA4QsJSovrkC4saKHQVs7TvcaeO8AIl5I= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/go.mod b/go.mod index 4b3ff2d..64fb3f7 100644 --- a/go.mod +++ b/go.mod @@ -2,11 +2,4 @@ module github.com/andrioid/gastro go 1.26.1 -require ( - github.com/alecthomas/chroma/v2 v2.23.1 - github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 - github.com/yuin/goldmark v1.8.2 - github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc -) - -require github.com/dlclark/regexp2 v1.11.5 // indirect +require github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 diff --git a/go.sum b/go.sum index 30c97a4..0be9157 100644 --- a/go.sum +++ b/go.sum @@ -1,28 +1,2 @@ -github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0= -github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= -github.com/alecthomas/chroma/v2 v2.2.0/go.mod h1:vf4zrexSH54oEjJ7EdB65tGNHmH3pGZmVkgTP5RHvAs= -github.com/alecthomas/chroma/v2 v2.23.1 h1:nv2AVZdTyClGbVQkIzlDm/rnhk1E9bU9nXwmZ/Vk/iY= -github.com/alecthomas/chroma/v2 v2.23.1/go.mod h1:NqVhfBR0lte5Ouh3DcthuUCTUpDC9cxBOfyMbMQPs3o= -github.com/alecthomas/repr v0.0.0-20220113201626-b1b626ac65ae/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= -github.com/alecthomas/repr v0.5.2 h1:SU73FTI9D1P5UNtvseffFSGmdNci/O6RsqzeXJtP0Qs= -github.com/alecthomas/repr v0.5.2/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= -github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= -github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ= -github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= -github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= -github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/yuin/goldmark v1.4.15/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yuin/goldmark v1.8.2 h1:kEGpgqJXdgbkhcOgBxkC0X0PmoPG1ZyoZ117rDVp4zE= -github.com/yuin/goldmark v1.8.2/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg= -github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc h1:+IAOyRda+RLrxa1WC7umKOZRsGq4QrFFMYApOeHzQwQ= -github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc/go.mod h1:ovIvrum6DQJA4QsJSovrkC4saKHQVs7TvcaeO8AIl5I= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/internal/lsp/shadow/workspace_test.go b/internal/lsp/shadow/workspace_test.go index bd3bc77..f938abe 100644 --- a/internal/lsp/shadow/workspace_test.go +++ b/internal/lsp/shadow/workspace_test.go @@ -679,11 +679,11 @@ func createTestProject(t *testing.T) string { // createGastroLinkedProject creates a Go project whose go.mod // (borrowed from examples/gastro) replaces github.com/andrioid/gastro // with the local checkout, so `go build` can type-check shadow output -// that imports the real gastro runtime — including all transitive -// runtime dependencies (chroma, goldmark, etc.). Copying the example's -// go.mod / go.sum is the cheapest way to get a fully resolved module -// graph without running `go mod tidy` (which is slow and requires -// network in some configurations). +// that imports the real gastro runtime. The example's go.mod / go.sum +// also pull in the user-side markdown stack (goldmark + chroma via the +// example's md package); copying them is the cheapest way to get a +// fully resolved module graph without running `go mod tidy` (which is +// slow and requires network in some configurations). func createGastroLinkedProject(t *testing.T) string { t.Helper() dir := t.TempDir() diff --git a/pkg/chromalexer/gastro/gastro.go b/pkg/chromalexer/gastro/gastro.go deleted file mode 100644 index 24757f6..0000000 --- a/pkg/chromalexer/gastro/gastro.go +++ /dev/null @@ -1,111 +0,0 @@ -// Package gastro registers a Chroma syntax-highlighting lexer for .gastro -// files with Chroma's global lexer registry. -// -// Usage: -// -// import ( -// "github.com/alecthomas/chroma/v2/lexers" -// _ "github.com/andrioid/gastro/pkg/chromalexer/gastro" -// ) -// -// lex := lexers.Get("gastro") -// -// The lexer delegates non-Gastro content to the HTML lexer and frontmatter -// content to the Go lexer. Go template expressions ({{ ... }}) and component -// tags () are tokenised with dedicated rules. The approach -// intentionally mirrors the minimal tree-sitter grammar under -// tree-sitter-gastro/: the inside of {{ ... }} is not sub-tokenised. -package gastro - -import ( - "github.com/alecthomas/chroma/v2" - "github.com/alecthomas/chroma/v2/lexers" -) - -// Lexer is the Chroma lexer for .gastro files. It is registered with the -// global lexer registry at init time and can be retrieved via -// lexers.Get("gastro"). -var Lexer chroma.Lexer - -func init() { - Lexer = lexers.Register(chroma.DelegatingLexer( - lexers.Get("html"), - chroma.MustNewLexer( - &chroma.Config{ - Name: "Gastro", - Aliases: []string{"gastro"}, - Filenames: []string{"*.gastro"}, - MimeTypes: []string{"text/x-gastro"}, - DotAll: true, - }, - gastroRules, - ), - )) -} - -func gastroRules() chroma.Rules { - return chroma.Rules{ - "root": { - // Frontmatter must appear at the very start of the document. - // Note: we do NOT consume the trailing newline, so the closing - // delimiter's leading \n can still match in the "frontmatter" state. - {Pattern: `\A---`, Type: chroma.CommentPreproc, Mutator: chroma.Push("frontmatter")}, - - // Go template expression: {{ ... }}. Kept opaque on purpose to - // match the tree-sitter grammar's @embedded region. - {Pattern: `\{\{.*?\}\}`, Type: chroma.CommentPreproc}, - - // Opening component tag: or - {Pattern: `(<)([A-Z][A-Za-z0-9]*)`, Type: chroma.ByGroups(chroma.Punctuation, chroma.NameClass), Mutator: chroma.Push("component")}, - - // Closing component tag: - {Pattern: `()`, Type: chroma.ByGroups(chroma.Punctuation, chroma.NameClass, chroma.Punctuation)}, - - // Everything else is delegated to the HTML lexer by the outer - // DelegatingLexer. - {Pattern: `[^<{]+`, Type: chroma.Other}, - {Pattern: `[<{]`, Type: chroma.Other}, - }, - "frontmatter": { - // Closing delimiter ends frontmatter. Tried first so it wins over - // the catch-all rules below. - {Pattern: `\n---\n`, Type: chroma.CommentPreproc, Mutator: chroma.Pop(1)}, - // Everything inside is Go. Split into two rules so both newlines - // and non-newline runs are consumed. - {Pattern: `\n`, Type: chroma.Using("go")}, - {Pattern: `[^\n]+`, Type: chroma.Using("go")}, - }, - "component": { - // Self-closing or regular close of the opening tag. - {Pattern: `\s*/>`, Type: chroma.Punctuation, Mutator: chroma.Pop(1)}, - {Pattern: `\s*>`, Type: chroma.Punctuation, Mutator: chroma.Pop(1)}, - - {Pattern: `\s+`, Type: chroma.Text}, - - // prop={go-expr} - { - Pattern: `([A-Za-z][A-Za-z0-9]*)(=)(\{)([^}]*)(\})`, - Type: chroma.ByGroups( - chroma.NameAttribute, - chroma.Operator, - chroma.Punctuation, - chroma.Using("go"), - chroma.Punctuation, - ), - }, - - // prop="literal" - { - Pattern: `([A-Za-z][A-Za-z0-9]*)(=)("[^"]*")`, - Type: chroma.ByGroups( - chroma.NameAttribute, - chroma.Operator, - chroma.LiteralString, - ), - }, - - // Bare attribute (no value). - {Pattern: `[A-Za-z][A-Za-z0-9]*`, Type: chroma.NameAttribute}, - }, - } -} diff --git a/pkg/chromalexer/gastro/gastro_test.go b/pkg/chromalexer/gastro/gastro_test.go deleted file mode 100644 index 99a9d83..0000000 --- a/pkg/chromalexer/gastro/gastro_test.go +++ /dev/null @@ -1,130 +0,0 @@ -package gastro_test - -import ( - "strings" - "testing" - - "github.com/alecthomas/chroma/v2" - "github.com/alecthomas/chroma/v2/lexers" - - _ "github.com/andrioid/gastro/pkg/chromalexer/gastro" -) - -// tokenize runs the registered "gastro" lexer over src and returns the -// flattened token stream. It fails the test on any lexer error. -func tokenize(t *testing.T, src string) []chroma.Token { - t.Helper() - - lex := lexers.Get("gastro") - if lex == nil { - t.Fatal(`lexers.Get("gastro") returned nil — init() did not register the lexer`) - } - - it, err := lex.Tokenise(nil, src) - if err != nil { - t.Fatalf("tokenise: %v", err) - } - return it.Tokens() -} - -// hasToken reports whether the stream contains a token whose type matches -// tt and whose value, trimmed of surrounding whitespace, equals value. -func hasToken(tokens []chroma.Token, tt chroma.TokenType, value string) bool { - for _, tok := range tokens { - if tok.Type == tt && strings.TrimSpace(tok.Value) == value { - return true - } - } - return false -} - -func TestLexerIsRegistered(t *testing.T) { - t.Parallel() - - lex := lexers.Get("gastro") - if lex == nil { - t.Fatal(`lexers.Get("gastro") returned nil`) - } - if got := lex.Config().Name; got != "Gastro" { - t.Errorf("lexer name = %q, want %q", got, "Gastro") - } - - // Also resolvable by extension. - if byExt := lexers.Match("page.gastro"); byExt == nil { - t.Error(`lexers.Match("page.gastro") returned nil`) - } -} - -func TestFrontmatterDelimitersAreHighlighted(t *testing.T) { - t.Parallel() - - src := "---\nprops: struct{}\n---\n
hi
\n" - tokens := tokenize(t, src) - - if !hasToken(tokens, chroma.CommentPreproc, "---") { - t.Errorf("expected CommentPreproc token for frontmatter delimiter; got tokens:\n%v", tokens) - } -} - -func TestTemplateExpressionsAreEmbedded(t *testing.T) { - t.Parallel() - - src := "---\n---\n

{{ .Name }}

\n" - tokens := tokenize(t, src) - - if !hasToken(tokens, chroma.CommentPreproc, "{{ .Name }}") { - t.Errorf("expected {{ .Name }} to be tokenised as CommentPreproc; got tokens:\n%v", tokens) - } -} - -func TestComponentTagsAndProps(t *testing.T) { - t.Parallel() - - src := "---\n---\n