asciidoctor / asciidoctor-vscode

AsciiDoc support for Visual Studio Code using Asciidoctor
Other
323 stars 97 forks source link

Reference from a header to a header defined below is not rendered correctly #325

Open mmatrosov opened 4 years ago

mmatrosov commented 4 years ago

Description

In the preview pane, the reference to a header is not rendered correctly if the header is defined below and is used in another header.

System Information

Version: 1.45.1 (system setup) Commit: 5763d909d5f12fe19f215cbfdd29a91c0fa9208a Date: 2020-05-14T08:27:35.169Z Electron: 7.2.4 Chrome: 78.0.3904.130 Node.js: 12.8.1 V8: 7.8.279.23-electron.0 OS: Windows_NT x64 10.0.17134

AsciiDoc extension v2.7.15

To Reproduce

Steps to reproduce the issue:

  1. Create .adoc file
  2. Enter this text:
    
    [[HEADER1]]
    === header 1

Refer to <> in text

Refer to <> in text

=== Refer to <> in a header

=== Refer to <> in a header

[[HEADER2]] === header 2



## Screenshots & Files

![image](https://user-images.githubusercontent.com/3617951/83510012-fc3b7b00-a4d4-11ea-8c3c-d7f51947eb46.png)
danyill commented 4 years ago

Thanks for reporting @mmatrosov

I've tested this using Asciidoctor Ruby 2.0.10 and observed the same issue. So I believe this is not an issue with this extension but an issue in Asciidoctor core. I'd suggest you file an issue in https://github.com/asciidoctor/asciidoctor if there is not already one (I had a quick look but couldn't find it).