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

Ability to add heading fragments #119

Merged
merged 4 commits into from
Dec 14, 2015

Conversation

BradlySharpe
Copy link
Contributor

Fixes issue #13.

Not sure if there may be a better way of doing this. The problem is the regex for the headings expects the heading to be on a line by itself.

@@ -127,6 +127,32 @@ function applyDirectives(text) {
return text;
}

function addHeadingFragments(text) {
if (configuration.getConfig().features.fragments) {
Copy link
Owner

Choose a reason for hiding this comment

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

For better readibility I always prefer to shortcut ifs, like if (!something) { return }. In this case I will "fix it" after the merge :)

claudioc added a commit that referenced this pull request Dec 14, 2015
@claudioc claudioc merged commit 09f8bad into claudioc:master Dec 14, 2015
@claudioc
Copy link
Owner

Sorry, I had to revert this one because I doesn't work very well: when you create an headerFragment the html rendering below gets strange (it has something to do with :before element or the icon...). Try adding two or three H one after the other: it seems like the second one get moved to the right

@BradlySharpe
Copy link
Contributor Author

Will give it a go now, I thought I had tested that one.

I was going to do if (!something) { return; } but thought this provides better readability and less lines. Happy to change it though.

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