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

Add a mechanism to escape '+' fragments #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pganssle
Copy link
Contributor

@pganssle pganssle commented Nov 6, 2020

Prior to this change, it was not possible to start a line with + at all, which is particularly problematic when you have a diff in literal blocks.

Possibly a better long-term fix for this problem would be to disable all pre-processing between triple-backticks, but the ability to escape + at the beginning of a line seems useful in itself and is much easier to implement.

Prior to this change, it was not possible to start a line with `+` at
all, which is particularly problematic when you have a diff in literal
blocks.

Possibly a better long-term fix for this problem would be to disable all
pre-processing between triple-backticks, but the ability to escape `+`
at the beginning of a line seems useful in itself and is much easier to
implement.
@dploeger dploeger requested a review from mrmanc November 8, 2020 11:05
@@ -62,13 +62,22 @@
| replace:'<backgroundimageopacity>','<!-- .slide: data-background-opacity="'
| replace:'</backgroundimageopacity>','" -->'
%}{%
assign first_char = line | strip
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was it important to remove the strip filter? I think this is there to make sure we still detect indented fragments. Looking at your change locally it looks like the indented fragment now renders with it’s parent rather than as a separate step.

@mrmanc
Copy link
Collaborator

mrmanc commented Sep 6, 2022

I’ve found that this also impacts mermaid diagrams which have indented + symbols in the class diagram syntax, e.g.

class Deck {
  + shuffle()
  + getCards()
  + deal()
}

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

Successfully merging this pull request may close these issues.

2 participants