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

Editable sections. #135

Closed
wants to merge 4 commits into from
Closed

Editable sections. #135

wants to merge 4 commits into from

Conversation

dometto
Copy link
Member

@dometto dometto commented Jan 16, 2015

PR to discuss pros/cons of this experimental implementation of gollum/gollum#715

Another way of implementing this would be by parsing the document into sections client-sided, through the markup libraries already available as part of the ACE editor. However, I don't know if any them support extracting sections, and the problem remains of how to map id's generated by gollum's TOC filter to the raw markup.

@dometto
Copy link
Member Author

dometto commented Jan 21, 2015

We're now considering moving to markdown.js for the livepreview (gollum/gollum#826). markdown.js supports generating an intermediate representation of the data, which we could possible use to split the sections up. We could look up the correct id's for each section via an ajax call. Possible pitfall is the fenced codeblocks: since markdown.js doesn't support these (yet -- evilstreak/markdown-js#41), lines starting with # in a code block will probably be misinterpreted as section headings.

EDIT: markdown.js can't reconstruct markdown out of jsonml, so we'd have to hack the parser to include the linenumbers of each section in the jsonml, much like the kramdown hack in this PR.

@dometto dometto closed this Apr 23, 2015
@dometto dometto deleted the edit_sections branch April 23, 2015 22:05
@dometto dometto restored the edit_sections branch April 23, 2015 22:05
@dometto dometto deleted the edit_sections branch April 23, 2015 22:06
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.

1 participant