Git Product home page Git Product logo

Comments (12)

mkobit avatar mkobit commented on May 30, 2024 2

Adding to this issue as well as we are affected, but using include:file[tags=myTags] for source code documentation also does not work.

README.adoc

= Include Bug
:toc:

.Full source include
[source, groovy]
----
include::source-code.groovy[]
----

.Tagged source Include
[source, groovy]
----
include::source-code.groovy[tags=code]
----

source-code.groovy

def myVar = 'variable'
// tag::code[]
println(myVar)
println('We are in the tag')
// end::code[]

from bitbucket-asciidoc-plugin.

christiangalsterer avatar christiangalsterer commented on May 30, 2024 1

I finally found some time to look into your request.
Unfortunately it is not just changing the security level but additional changes are needed to parse the links and map them to bitbucket resources. This is somehow doable, but is not as as simply as it seemed in the first place.

When you say "I learned that for example github also does this" does this mean that github also doesn't render the include or that it support this (I could also try this but as you obviously tried it, would be great if you can clarify this question.

from bitbucket-asciidoc-plugin.

christiangalsterer avatar christiangalsterer commented on May 30, 2024

Hi @dbalakirev,

I will look into it the next days.

from bitbucket-asciidoc-plugin.

dbalakirev avatar dbalakirev commented on May 30, 2024

Thanks for checking out this issue!

I meant that to my knowledge includes won't work on github either.

What works there though, is it successfully replaces the include with a link.
From this page, I ended up at this example:
include::include.adoc[]

This include gets translated to a clickable link.

If this would work for the bitbucket plugin, the content would be accessible already for developers.

from bitbucket-asciidoc-plugin.

myannou avatar myannou commented on May 30, 2024

Hi,
I am facing the same issue.
The include feature of ascciiDoc with tags is one of the silver bullet that make me choice asciiDoc over MarkDown.
Unfortunately my knowledge on this part is too low to help fixing this issue.
But as you guess, I will be more than interested if you fix this issue ;-)

Thanks
Yann

from bitbucket-asciidoc-plugin.

achimgrimm avatar achimgrimm commented on May 30, 2024

Would it be possible to change the rendering from client side rendering to server side rendering?

from bitbucket-asciidoc-plugin.

christiangalsterer avatar christiangalsterer commented on May 30, 2024

I think where the rendering is done if not relevant for getting the support for includes.
I hope fully have some time in the next days and will look into it again what is possible here.

from bitbucket-asciidoc-plugin.

christiangalsterer avatar christiangalsterer commented on May 30, 2024

I now had some time to look into. Here a first overview how different includes are rendered.

File Includes

include::include/ad.adoc[]
include::{includedir}/ad.adoc[]

are both rendered into a HTML link in the same way as on GitHub.

Source Includes

[source,java]
----
include::include/Java.java[]
----

is rendered as

link:include/Java.java[]

in the same way as on GitHub.

Unfortunately it works only on master branch correctly as the link doesn't include the branch information, but I have a local fix already available.

Will proceed with some use cases and tests before cutting a new release with better support
support for includes.

from bitbucket-asciidoc-plugin.

dbalakirev avatar dbalakirev commented on May 30, 2024

That sounds promising. I am happy to give us a try, should you have a release. Of course I guess it will take a couple of days until I get them update the plugin version in our company bitbucket installation.

from bitbucket-asciidoc-plugin.

christiangalsterer avatar christiangalsterer commented on May 30, 2024

I tested it with the latest release version actually.

from bitbucket-asciidoc-plugin.

dbalakirev avatar dbalakirev commented on May 30, 2024

Ah ok. I misunderstood. I thought you actually had to fix something. Then I will test on our side to see if the problem is still around. Thanks for looking into it.

from bitbucket-asciidoc-plugin.

christiangalsterer avatar christiangalsterer commented on May 30, 2024

Add-on 2.4.0 and 3.1.0 are now released supporting file includes.

from bitbucket-asciidoc-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.