mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-23 14:23:21 +00:00
Compare commits
2 Commits
92487d2f52
...
br-fix-two
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa62b32936 | ||
|
|
4aa5a00a6d |
@@ -381,11 +381,17 @@ const forcedParagraphBreaks = {
|
||||
tokenizer(src, tokens) {
|
||||
const regex = /^(:+)(?:\n|$)/ym;
|
||||
const match = regex.exec(src);
|
||||
|
||||
if(match?.length) {
|
||||
let extraBreak = 0;
|
||||
const lastToken = tokens[tokens.length - 1];
|
||||
if(lastToken?.type == 'text')
|
||||
extraBreak = 1;
|
||||
|
||||
return {
|
||||
type : 'hardBreaks', // Should match "name" above
|
||||
raw : match[0], // Text to consume from the source
|
||||
length : match[1].length,
|
||||
length : match[1].length + extraBreak,
|
||||
text : ''
|
||||
};
|
||||
}
|
||||
|
||||
@@ -137,6 +137,9 @@
|
||||
line-height : 0.951em; //Font is misaligned. Shift up slightly
|
||||
& + * { margin-top : 0.2cm; }
|
||||
}
|
||||
br + h3, br + h4 {
|
||||
margin-top : 0;
|
||||
}
|
||||
// *****************************
|
||||
// * TABLE
|
||||
// *****************************/
|
||||
|
||||
Reference in New Issue
Block a user