You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "sumpfralle (via GitHub)" <gi...@apache.org> on 2024/03/26 11:34:58 UTC
[I] docs: "copy" button mangles content of Makefile snippet [nuttx]
sumpfralle opened a new issue, #12000:
URL: https://github.com/apache/nuttx/issues/12000
The rendered docs contain Makefile snippets in some places, e.g.: https://nuttx.apache.org/docs/latest/guides/customapps.html#makefile
The content of the snippet is supposed to be exportable via the "copy" button in the top right corner.
But for the above example only a broken/mangled text is exported:
```
files
Build targets
Compile C Files
(COBJS): %$(OBJEXT): %.c
(call COMPILE, $<, $@)
Add object files to the apps archive
(call ARCHIVE, libapps.a, $(COBJS))
Create directory links
Setup any special pre-build context
Setup any special pre-configuration context
Make the dependency file, Make.deps
(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) > Make.dep
Clean the results of the last build
(call CLEAN)
Remove the build context and directory links
Restore the directory to its original state
(call DELFILE, Make.dep)
Include dependencies
```
The following details are missing:
* leading `$`
* leading `#`
* some other lines
* indentation (spaces instead of tabs)
The indentation issue is minor, since `make` (and editors) will complain about mangling, anyway.
But the first two issues (especially missing `$`) can really take a lot of time to understand/debug (makefile error messages are sometimes hard to grasp).
It looks like [copybutton.js](https://nuttx.apache.org/docs/latest/_static/copybutton.js) causes the issue:
```js
// get filtered text
let exclude = '.linenos, .gp, .go';
```
The above code snippet causes the removal of all "nodes" with the `.linenos`, `.gp` and `.go` CSS classes.
The `.gp` class seems to be used for the comment characters (`#`) and for `$`.
The `.go` class is used for most assignments.
The above exclusions are configured in `Documentation/conf.py`. They were introduced in
14d311ca0ab4eef693f92ca8ad1f97af098157e5 (with the addition of sphinx's "copy button" feature). I assume, `.go` and `.gp` can be removed without causing issues.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] docs: "copy" button mangles content of Makefile snippet [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on issue #12000:
URL: https://github.com/apache/nuttx/issues/12000#issuecomment-2027281175
@btashton could you please take a look?
@xiaoxiang781216 did you face this issue too?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] docs: "copy" button mangles content of Makefile snippet [nuttx]
Posted by "btashton (via GitHub)" <gi...@apache.org>.
btashton commented on issue #12000:
URL: https://github.com/apache/nuttx/issues/12000#issuecomment-2027290951
I can look this weekend. Thanks for the report.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org