-
Notifications
You must be signed in to change notification settings - Fork 50
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(markdown-slate): linked variables #367
Conversation
Just a quick note @d-e-v-esh, this won't exactly close accordproject/web-components#175, because at the very least we'll want to release and update this package within |
@irmerk That is totally good. I can create another PR for |
Pinging @jeromesimeon and @dselman on this PR. |
hm...that doesn't seem right to me. If you change the variable names in Slate, you won't be able to convert Slate back to its original CiceroMark. Also this issue isn't specific to lists. It will happen for any nested variable with the same name. |
Before you open a PR, it's useful to check that the linter and tests pass locally. You can do that by running |
I don't know what would be the best way to solve this issue. This solution was proposed by Dan here. I followed through and it fixed the issue so I made the PR. |
Thanks for telling. I didn't know about that. I'll fix this PR and keep that in mind from now. |
Signed-off-by: d-e-v-esh <[email protected]>
Signed-off-by: d-e-v-esh [email protected]
Helps to resolve accordproject/web-components#175
The list items of the
volumediscountolist
template have linked variables. This is because they all are dealing with the same kind of variables. Checking of those variables are inside of a list and if that is true then changing their names fixes this issue.Changes
list_item
.children
that contains an array with one element inside it.That element is another object with the type
paragraph
that contains the data for the actual data that is in the list item.It contains another array called
children
with the data that is inside the line like this.As you can see, it has 7 different objects as elements of the array. Each element is there to create a divide between the normal text and variables and all the variables have a type variable
Each variable contains an object called
data
where the name of the variable residesWe have to change that name and it works. We basically check if a variable is inside a list item and if that is true then we add the index of the list next to the variable and it looks like this.
Author Checklist
--signoff
option of git commit.master
fromfork:branchname