Added option to stop inclusion of page content at a certain point.#210
Open
lpaulsen93 wants to merge 4 commits intodokufreaks:masterfrom
Open
Added option to stop inclusion of page content at a certain point.#210lpaulsen93 wants to merge 4 commits intodokufreaks:masterfrom
lpaulsen93 wants to merge 4 commits intodokufreaks:masterfrom
Conversation
This can be done by using the syntax tag '{{includestop}}' or by using the flag 'length'.
E.g. if 'length=1000' is set, then only 1000 signs of a page will be included, counted is only cdata content.
michitux
requested changes
Apr 15, 2018
Member
michitux
left a comment
There was a problem hiding this comment.
In general I like the idea but I fear to get this to work properly there is more work needed. I have added a simple example to test case that does not work yet. Further, I think the current code doesn't close nested lists properly. Plugin support is also totally missing.
I have a different suggestion: what about disallowing the {{includestop}} syntax in nested environments, i.e., making this a syntax that only works in the top level or maybe in top level paragraphs. That should make the whole "close everything" code much simpler.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This can be done by using the syntax tag
{{includestop}}or by using the flaglength.E.g. if
length=1000is set, then only 1000 signs of a page will be included, counted is onlycdatacontent.Some more points to mention:
{{includestop}}and flaglengthare used on the page then the earlier one winslengthflag or{{includestop}}then the current list content item and list is properly closed but no more list items are createdlengthflag or{{includestop}}then the current table cell row and table is properly closed but no more table rows are createdlengthflag or{{includestop}}are used then the read more link will be created if the flagreadmoreis set