-
Notifications
You must be signed in to change notification settings - Fork 123
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
Page-nav items behaving oddly if inline includes are combined with spans #1607
Comments
👀 to add, it seems page specific: |
An update: The relevant source code is in https://raw.githubusercontent.com/se-edu/se-book/master/_markbind/boilerplates/container-inParent-asPanel.md <panel type="seamless" expanded>
<span slot="header" class="card-title"><markdown>## <include src="text.md#title" inline /></markdown></span>
<include src="text.md#body" />
</panel> Strangely, if I add some chars between <panel type="seamless" expanded>
<span slot="header" class="card-title"><markdown>## topic: <include src="text.md#title" inline /></markdown></span>
<include src="text.md#body" />
</panel> |
This problem cropped up in another place, albeit in a slightly different form: See https://nus-cs2103-ay2122s1.github.io/website/schedule/week3/project.html Note how the pageNav items appear out of order. I managed to narrow down the problem to the following sample code. <frontmatter>
pageNav: 4
pageNavTitle: "Sample page"
</frontmatter>
# Shows
## <span class="text-danger">1</span> Rick and Morty
## <span class="text-danger">2</span> <include src="topic2.md#name" inline trim/>
## <span class="text-danger">x</span> <include src="topic2.md#name" inline trim/>
## y <span class="text-danger">4</span> <include src="topic2.md#name" inline trim/> Note how one pageNav item appears out of order. What I observed:
|
Raising severity as the new symptom is more noticeable to the reader. |
Given the strange behavior involving numbers/symbols, I wonder if a regular expression is behind it all 🤔 |
Let's try to fix this before the semester starts. In the worst case, I can use the hack of adding some text in front, but not ideal. |
Thanks for the examples, I published a fix for the first part of the issue (pagenav not working without some "pretext"). It might fix the second part as well @damithc |
Thanks for the fix @ang-zeyu |
🎉 |
v3.0.3
Expected: page-nav should detect the current topic in view e.g., (from V2)
Actual:
Example:
https://se-education.org/se-book/designFundamentals/index.html
The text was updated successfully, but these errors were encountered: