Skip to content

Commit

Permalink
Merge branch 'jow-:master' into improve_test_on_macos
Browse files Browse the repository at this point in the history
  • Loading branch information
ErwanMAS committed Oct 20, 2023
2 parents ea756fd + 07c0317 commit 7f9e809
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 139 deletions.
94 changes: 0 additions & 94 deletions docs/ucode.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 0 additions & 39 deletions docs/ucode.js

This file was deleted.

16 changes: 15 additions & 1 deletion jsdoc/c-transpiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@

'use strict';

function isCommentStart(source, offset) {
if (source[offset++] != '\n')
return false;

while (source[offset] == ' ' || source[offset] == '\t')
offset++;

return (
source[offset++] == '/' &&
source[offset++] == '*' &&
source[offset++] == '*'
);
}

exports.handlers = {
beforeParse: function(e) {
if (!e.filename.match(/\.(c|h)$/))
Expand All @@ -28,7 +42,7 @@ exports.handlers = {
let i = 0;

for (i = 0; i < e.source.length; i++) {
if (!chunk.comment && e.source[i] == '\n' && e.source[i+1] == '/' && e.source[i+2] == '*' && e.source[i+3] == '*') {
if (!chunk.comment && isCommentStart(e.source, i)) {
chunk.end = i;
chunk = { start: i, end: -1, comment: true };
chunks.push(chunk);
Expand Down
5 changes: 1 addition & 4 deletions jsdoc/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"idInHeadings": true
},
"opts": {
"template": "node_modules/clean-jsdoc-theme",
"template": "node_modules/ucode-jsdoc-theme",
"destination": "docs",
"recurse": true,
"readme": "docs/README.md",
Expand All @@ -41,9 +41,6 @@
"include_css": [
"docs/ucode.css"
],
"include_js": [
"docs/ucode.js"
],
"menu": [
{
"title": "GitHub Project Page",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"doc": "LC_ALL=C jsdoc -c jsdoc/conf.json"
},
"devDependencies": {
"clean-jsdoc-theme": "^4.2.9",
"ucode-jsdoc-theme": "https://github.com/jow-/ucode-jsdoc-theme.git",
"jsdoc": "^4.0.2"
}
}

0 comments on commit 7f9e809

Please sign in to comment.