Fix and add integration test for the Bootstrap SCSS module for both Dart Sass and Libsass

This fixes the reverse filesystem lookup (absolute filename to path relative to the composite filesystem).

The old logic had some assumptions about the locality of the actual files that didn't work in more complex scenarios.

This commit now also adds the popular Bootstrap SCSS Hugo module to the CI build (both for libsass and dartsass transpiler), so we can hopefully avoid similar future breakage.

Fixes #12178
This commit is contained in:
Bjørn Erik Pedersen
2024-02-29 19:05:23 +01:00
parent 7023cf0f07
commit 0d6e593ffb
7 changed files with 135 additions and 37 deletions

View File

@@ -183,6 +183,13 @@ type lockingBuffer struct {
bytes.Buffer
}
func (b *lockingBuffer) ReadFrom(r io.Reader) (n int64, err error) {
b.Lock()
n, err = b.Buffer.ReadFrom(r)
b.Unlock()
return
}
func (b *lockingBuffer) Write(p []byte) (n int, err error) {
b.Lock()
n, err = b.Buffer.Write(p)