-
-
Notifications
You must be signed in to change notification settings - Fork 291
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added combining accents, rationalized trig functions
- Loading branch information
Showing
12 changed files
with
158 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -335,7 +335,7 @@ | |
width: 0; | ||
} | ||
|
||
.ML__accent-vec { | ||
.ML__accent-combining-char { | ||
position: relative; | ||
left: 0.24em; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
// | ||
// Local server to test CSP headers | ||
// | ||
const http = require('http'); | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
// Directory where your esbuild output is located | ||
const servedir = path.join(__dirname, '../'); | ||
|
||
// Generate a random nonce | ||
const nonce = 'a=base-64=encoded=nonce'; | ||
|
||
// Content Security Policy header | ||
const cspHeader = `default-src 'self'; script-src 'self' 'unsafe-inline' https://unpkg.com; style-src 'self' 'unsafe-inline'; img-src 'unsafe-inline'`; | ||
|
||
// Create an HTTP server | ||
const server = http.createServer((req, res) => { | ||
// Construct the file path | ||
let filePath = path.join(servedir, req.url === '/' ? 'dist/smoke/' : req.url); | ||
if (filePath.endsWith('/')) filePath += 'index.html'; | ||
|
||
// Check if the file exists | ||
fs.exists(filePath, (exists) => { | ||
if (exists) { | ||
// Read and serve the file | ||
fs.readFile(filePath, (err, content) => { | ||
if (err) { | ||
res.writeHead(500); | ||
res.end('Server Error'); | ||
} else { | ||
// Set the appropriate content type | ||
const ext = path.extname(filePath); | ||
const contentType = getContentType(ext); | ||
res.writeHead(200, { | ||
'Content-Type': contentType, | ||
'Content-Security-Policy': cspHeader, | ||
}); | ||
res.end(content, 'utf-8'); | ||
} | ||
}); | ||
} else { | ||
// If the file doesn't exist, return 404 | ||
res.writeHead(404); | ||
res.end(`${filePath} not found`); | ||
} | ||
}); | ||
}); | ||
|
||
// Function to determine the content type based on file extension | ||
function getContentType(ext) { | ||
switch (ext) { | ||
case '.html': | ||
return 'text/html'; | ||
case '.js': | ||
case '.mjs': | ||
return 'application/javascript'; | ||
case '.css': | ||
return 'text/css'; | ||
case '.json': | ||
return 'application/json'; | ||
case '.png': | ||
return 'image/png'; | ||
case '.jpg': | ||
return 'image/jpeg'; | ||
default: | ||
return 'application/octet-stream'; | ||
} | ||
} | ||
|
||
// Start the server | ||
const PORT = 8080; | ||
server.listen(PORT, () => { | ||
console.log(`Server is running on http://localhost:${PORT}/`); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters