Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix highlight.js highlighting #65

Closed
spinkney opened this issue Jan 26, 2022 · 2 comments
Closed

Fix highlight.js highlighting #65

spinkney opened this issue Jan 26, 2022 · 2 comments

Comments

@spinkney
Copy link
Owner

spinkney commented Jan 26, 2022

Doxygen has a bunch of stuff in the bottom of the fragment that is unwanted. If there are any js experts out there who can help, here's the js that I'm currently using

	$(function() {
		$(".fragment").each(function(i,node) {
		  var $node = $(node);
		  $node.html("<pre><code class='stan'>" + 
					 $node.text()+"</code></pre>");
					 hljs.highlightAll(node);
	});

And that results in getting something like this where I've circled the issue
image

In the html this is caused by the last line in
image

I've attempted to remove this by using the following from @rok-cesnovar but it's,unfortunately, not working

$(function() {
        $(".fragment").each(function(i,node) {
            var without_last = $(this).clone();
            without_last.children().last().remove();
          var $node = $(without_last);
          $node.html("<pre><code class='stan'>" + 
                     $node.text()+"</code></pre>");
                     hljs.highlightAll(node);
    });
});

Also, everything after the #includes is getting eaten. Look at https://spinkney.github.io/helpful_stan_functions/group__mixed__copula.html.

  • I'm thinking to grab that text getElementsByClassName("code")[0]; and place it within the #include text which is in the preprocessor class.
  • Once the element gets to ttc class can we just end the each loop?
@IssueHuntBot
Copy link

@spinkney has funded $100.00 to this issue.


@IssueHuntBot
Copy link

@spinkney has cancelled funding for this issue.(Cancelled amount: $100.00) See it on IssueHunt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants