Skip to content

Conversation

@czipperz
Copy link

No description provided.

@czipperz czipperz force-pushed the markdown-parsing-fenced-code-blocks branch 2 times, most recently from a8e8984 to d6efcb2 Compare April 14, 2019 21:35
poly-markdown.el Outdated
:allow-nested nil)

(defun poly-markdown-fenced-code-begin-accessor (val)
(cons (point)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not just (cons (car val) (cadr val))? Those are the locations of the property.

Copy link
Contributor

Choose a reason for hiding this comment

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

In fact I would prefer to match without relying on the accessor because those properties could be potentially moved and not immediately updated.

This increment at the end of the property is a common requirement. YAML should also do that. So I have implemented a simple :inc-end accessor for pm-make-text-property-matcher.

@vspinu vspinu force-pushed the markdown-parsing-fenced-code-blocks branch from bb9f79b to 5832c42 Compare April 15, 2019 12:11
@vspinu
Copy link
Contributor

vspinu commented Apr 15, 2019

I have force-pushed to your branch the new way of doing that increment.

One deletion test is failing though.

@vspinu
Copy link
Contributor

vspinu commented Apr 15, 2019

I cannot reproduce the issue when replicating the steps interactively but I do see other issues when deleting fences.

So I am afraid this part is challenging and doesn't quite work. We will have to pause on it for a while.

@czipperz
Copy link
Author

It's in this code chunk. I think it needs to somehow refresh the markdown faces since we now rely on them. If we delete these four lines, the tests pass: https://github.com/czipperz/poly-markdown/blob/markdown-parsing-fenced-code-blocks/tests/poly-markdown-tests.el#L124-L127

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